在SOAP调用中传递PHP数组

在SOAP调用中传递PHP数组,php,xml,arrays,soap,Php,Xml,Arrays,Soap,因此,我尝试在SOAP请求中包含以下XML: <Responses> <Response> <QuestionAnswerID>someint</QuestionAnswerID> <QuestionID>someint</QuestionID> </Response> <Response> <QuestionAnswerI

因此,我尝试在SOAP请求中包含以下XML:

<Responses>
    <Response>
        <QuestionAnswerID>someint</QuestionAnswerID>
        <QuestionID>someint</QuestionID>
    </Response>
    <Response>
        <QuestionAnswerID>someint</QuestionAnswerID>
        <QuestionID>someint</QuestionID>
    </Response>
</Responses>
问题是数组现在有索引,我调用的web服务似乎不喜欢索引。有没有办法生成类似上述XML的内容


TIA。

如果没有一个带有WSDL的SOAP服务器,很难对其进行测试。您应该能够像这样创建关联数组:

$responses = array();
$responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);
$responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);

$response = array("Response" => $responses);

$soapData = array("Responses" => $response);

有人刚刚把这个贴在我的一个问题上……;)谢谢。。我没有那样做。我想我现在就开始。
$responses = array();
$responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);
$responses[] = array("QuestionAnswerID" => someint, "QuestionID" => someint);

$response = array("Response" => $responses);

$soapData = array("Responses" => $response);