我与EJB创建SOAP服务通信 - 它间歇性失败,我发现我在哪里可以可靠地重现的情况下。SOAP PHP解析错误?
我得到一个时髦的屁股SOAP错误,说:“看起来我们有没有XML”,然而,检索响应最后,当我得到了什么是下面列出(和什么样子有效的XML我)。
有什么想法?
SOAP错误:
object(SoapFault)#2 (9) {
["message:protected"]=> string(33) "looks like we got no XML document"
["string:private"]=> string(0) ""
["code:protected"]=> int(0)
["file:protected"]=> string(40) "/Users/josh/Sites/blahblahblah/test-update.php"
["line:protected"]=> int(26)
["trace:private"]=> array(2) {
[0]=> array(4) {
["function"]=> string(6) "__call"
["class"]=> string(10) "SoapClient"
["type"]=> string(2) "->"
["args"]=> array(2) {
[0]=> string(24) "UpdateApplicationProfile"
[1]=> array(1) {
[0]=> array(2) {
["suid"]=> string(36) "62eb56ee-45de-4971-9234-54d72bbcd0e4"
["appid"]=> string(36) "6be2f269-4ddc-48af-9d47-30b7cf3d0499"
}
}
}
}
[1]=> array(6) {
["file"]=> string(40) "/Users/josh/Sites/blahblahblah/test-update.php"
["line"]=> int(26)
["function"]=> string(24) "UpdateApplicationProfile"
["class"]=> string(10) "SoapClient"
["type"]=> string(2) "->"
["args"]=> array(1) {
[0]=> array(2) {
["suid"]=> string(36) "62eb56ee-45de-4971-9234-54d72bbcd0e4"
["appid"]=> string(36) "6be2f269-4ddc-48af-9d47-30b7cf3d0499"
}
}
}
}
["faultstring"]=> string(33) "looks like we got no XML document"
["faultcode"]=> string(6) "Client"
["faultcodens"]=> string(41) "http://schemas.xmlsoap.org/soap/envelope/"
}
和实际的原始XML响应使用客户 - > __ getLastResponse()获得:
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header>
</env:Header>
<env:Body>
<ns2:UpdateApplicationProfileResponse xmlns:ns2="blahblahblah">
<paramname>status</paramname>
<paramname>location</paramname>
<paramname>timezone</paramname>
<paramname>homepage</paramname>
<paramname>nickname</paramname>
<paramname>firstName</paramname>
<paramname>languages</paramname>
<paramname>color</paramname>
<paramname>lastName</paramname>
<paramname>gender</paramname>
<paramvalue></paramvalue>
<paramvalue></paramvalue>
<paramvalue></paramvalue>
<paramvalue></paramvalue>
<paramvalue>XXX XXX</paramvalue>
<paramvalue>XXX</paramvalue>
<paramvalue></paramvalue>
<paramvalue>CA0008</paramvalue>
<paramvalue>XXX</paramvalue>
<paramvalue></paramvalue>
</ns2:UpdateApplicationProfileResponse>
</env:Body>
</env:Envelope>
你可以尝试使用wireshark来查看到底是怎么回事吗? – troelskn 2009-07-28 20:17:24
不幸的是,它的全部都在我的测试环境中通过一个VPN隧道,所以我得到的只是ipsec数据包......当我没有通过vpn时,我看了一下,在这个问题的最初阶段,它看起来完全有效(没有流浪的空白) – Josh 2009-07-29 21:59:07