我正在尝试在我的SOAP请求中包含以下XML:
<Responses>
<Response>
<QuestionAnswerID>someint</QuestionAnswerID>
<QuestionID>someint</QuestionID>
</Response>
<Response>
<QuestionAnswerID>someint</QuestionAnswerID>
<QuestionID>someint</QuestionID>
</Response>
</Responses>
我看了一下这个帖子,它大致上是关于同一个话题的,但它产生的输出如下:
object(stdClass)#1 (1) {
["Responses"]=>
object(stdClass)#2 (1) {
["Response"]=>
array(2) {
[0]=>
object(stdClass)#3 (2) {
["QuestionAnswerID"]=>
int(someint)
["QuestionID"]=>
int(someint)
}
[1]=>
object(stdClass)#4 (2) {
["QuestionAnswerID"]=>
int(someint)
["SurveyQuestionID"]=>
int(someint)
}
}
}
}
问题在于这些数组现在有了索引,而我调用的网络服务似乎不喜欢它们。有什么方法可以生成类似上面的XML吗?
TIA。