从 Java 或 .Net 调用时 PHP WebService 不工作
我们创建了一个 PHP Soap Web 服务,并且从 PHP 客户端调用时可以完美运行。 但是当我们尝试从 Java 调用它时,它似乎返回 null。 我们已经使用了SoapUI,一切似乎都没问题...... 使用Wireshark捕获发送到客户端的数据,数据看起来没问题。
我们尝试更改名称空间,但它抛出异常:
javax.xml.ws.WebServiceException: Unexpected response element {http://[URLhere]//ws/sWSDL.php}getServiceXMLDetailsResponse expected: {subscriptionWS}getServiceXMLDetailsResponse
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$RpcLit.readResponse(ResponseBuilder.java:603)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy21.getServiceXMLDetails(Unknown Source)
at reynardito.ReyNardito.main(ReyNardito.java:28)
并且使用 Wireshark 数据包包含正确的信息,因此它似乎是某种解析错误...
以前有人解决过这个问题吗?
We have created a PHP Soap web service and works perfectly when called from a PHP client.
But when we try to call it from Java it seems to return null.
We have used SoapUI and everything seems to be alright...
Used Wireshark to catch the data sent to the client and the data seems alright.
We tried changing the namespace and it throws an exception:
javax.xml.ws.WebServiceException: Unexpected response element {http://[URLhere]//ws/sWSDL.php}getServiceXMLDetailsResponse expected: {subscriptionWS}getServiceXMLDetailsResponse
at com.sun.xml.internal.ws.client.sei.ResponseBuilder$RpcLit.readResponse(ResponseBuilder.java:603)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:110)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy21.getServiceXMLDetails(Unknown Source)
at reynardito.ReyNardito.main(ReyNardito.java:28)
And using Wireshark the data packet contains the right information, so it seems to be a parsing error of some kind...
Anyone have solved this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你用nusoap吗?
如果是这样...更改网址 {http://[URLhere]//ws/sWSDL.php?wsdl} 而不是 {http://[URLhere]//ws/sWSDL.php}
Are you using nusoap?
If so...change the url {http://[URLhere]//ws/sWSDL.php?wsdl} instead of {http://[URLhere]//ws/sWSDL.php}
这是 WSDL 的问题。
它缺少一些零件。
It was a problem with the WSDL.
It was missing some parts.