PHP WebService not working when invoked from Java or .Net
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.
精彩评论