Does this SOAP Fault mean what I think it means?

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?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

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

Solution 2

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.

Solution 3

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.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply