Passing a PHP array in a SOAP call

后端 未结 1 457
终归单人心
终归单人心 2020-12-11 22:04

So I am trying to include the following XML in my SOAP request:


    
        someint

        
相关标签:
1条回答
  • It's hard to test this without a SOAP server with your WSDL to go against. You should be able to create associative arrays like so:

    $responses = array();
    $responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);
    $responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);
    
    $response = array("Response" => $responses);
    
    $soapData = array("Responses" => $response);
    
    0 讨论(0)
提交回复
热议问题