Reputation: 104
So, I'm working on integrating Fedex's Address Validation into a site I'm working on. Fedex web services are SOAP-based, so we're in the magical land of WSDLs here. I'm not fluent with web services yet, so bear with me.
One can only consume the Address Validation service at a production level; I've got my production credentials situated, and a production URL in the port section of my WSDL.
In testing the service integration, I'm receiving this provocative message:
Fault Code:VersionMismatch String:Wrong Version
Fedex support thus far seems unable to answer this, so I'm gonna ask it here: why am I getting this fault? Am I right in suspecting that perhaps the SOAP version on our server is outdated, and, if so, is there any workaround anyone knows for this?
Upvotes: 2
Views: 6908
Reputation: 146540
This error means that you aren't getting a SOAP envelope that's valid and recognised by the client library. In other words, the XML returned by the server that normally looks like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
...
</soapenv:Body>
</soapenv:Envelope>
... looks like something else.
Among other reasons, that can happen if the server is crashing badly and sending a random error page, or if the end-point URL is not a SOAP server at all.
Upvotes: 0
Reputation: 19441
A common reason for this error seems to be a wrong namespace used for the envelope. See http://www.w3.org/TR/soap12-part1/#faultcodes and http://www.w3.org/TR/soap12-part1/#vmfault
Upvotes: 3
Reputation: 42890
There are several versions of both WSDL and SOAP, and PHP seems to have issues with at least WSDL 2.0.
Check the header of the WSDL file to verify what FedEx wants (they might provide several web services for different versions) and check with a sniffer what your script actually sends.
Upvotes: 2