Accessing SOAP response data

Help
harry
2006-07-21
2013-06-06
  • harry
    harry
    2006-07-21

    I have a SOAP server which is sending the types of response listed below.

    How can I access the <executeSoapSimpleNo> data with PHP?

    I have tried doing:
    var_dump($client->call('executeSoapSimple', $param, $namespace));
    but the only data is "bool(false)".

    Here is the response:

    HTTP/1.1 100 Continue
    Server: Microsoft-IIS/5.0
    Date: Fri, 21 Jul 2006 15:42:23 GMT

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.0
    Date: Fri, 21 Jul 2006 15:42:23 GMT
    Content-Length: 692
    Content-Type: text/html
    Set-Cookie: ASPSESSIONIDCAQAADQC=JEABPNPBJPNBFKCPEEMJCHCH; path=/
    Cache-control: private

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <soap:Body>
            <executeSoapSimpleResponse xmlns="https://www.nortonfinance.co.uk/brokeradmin/soapdev/">
                <executeSoapSimpleResult>Invalid XML Received : Inconsistent data found. Field = app_loan_purpose, value = TEST, Criteria = Numeric, min length 1, max length 2 (^[0-9]{1,2}$)</executeSoapSimpleResult>
                <executeSoapSimpleStatus>-5</executeSoapSimpleStatus>
                <executeSoapSimpleNo>0</executeSoapSimpleNo>
            </executeSoapSimpleResponse>
        </soap:Body>
    </soap:Envelope>

     

  • Anonymous
    2011-02-17

    Assign $soapClient->call() to a variable and parse the array to get your data.