Does this SOAP Fault mean what I think it means?

前端 未结 3 1703
再見小時候
再見小時候 2020-12-12 00:55

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

相关标签:
3条回答
  • 2020-12-12 01:25

    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.

    0 讨论(0)
  • 2020-12-12 01:31

    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

    0 讨论(0)
  • 2020-12-12 01:36

    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.

    0 讨论(0)
提交回复
热议问题