开发者

PHP WebService not working when invoked from Java or .Net

开发者 https://www.devze.com 2023-03-03 18:51 出处:网络
We have created a PHP Soap web service and works perfectly when called from a PHP client. But when we try to call it fro开发者_运维百科m Java it seems to return null.

We have created a PHP Soap web service and works perfectly when called from a PHP client. But when we try to call it fro开发者_运维百科m 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?


Are you using nusoap?

If so...change the url {http://[URLhere]//ws/sWSDL.php?wsdl} instead of {http://[URLhere]//ws/sWSDL.php}


It was a problem with the WSDL. It was missing some parts.

0

精彩评论

暂无评论...
验证码 换一张
取 消