mercredi 27 juillet 2016

Call Soap service from PHP code [duplicate]

This question already has an answer here:

Hello i need to call a soap SINGLEWSDL web service from php code , but i cant make it work. Please somebody help me.

Here is the XML request:

<x:Envelope xmlns:x="http://ift.tt/sVJIaE" xmlns:v="http://ift.tt/2aJMGLh" xmlns:v1="http://ift.tt/29ZbMZu">
    <x:Header/>
    <x:Body>
        <v:FindActiveCustomerByVat>
            <v:request>
                <v:Authentication>
                    <v1:Account>48357</v1:Account>
                    <v1:CompanyId>1093</v1:CompanyId>
                    <v1:Password>12345</v1:Password>
                </v:Authentication>
                <v:Vat>094047601</v:Vat>
            </v:request>
        </v:FindActiveCustomerByVat>
    </x:Body>
</x:Envelope>

and here the response:

<s:Envelope xmlns:s="http://ift.tt/sVJIaE">
    <s:Body>
        <FindActiveCustomerByVatResponse xmlns="http://ift.tt/2aJMGLh">
            <FindActiveCustomerByVatResult xmlns:a="http://ift.tt/29ZbMZu" xmlns:i="http://ift.tt/ra1lAU">
                <a:Errors>
                    <a:ServiceError>
                        <a:Code>5</a:Code>
                        <a:Message>Ο πελάτης δεν βρέθηκε.</a:Message>
                        <a:Level>Critical</a:Level>
                    </a:ServiceError>
                </a:Errors>
                <a:RequestCode>cdf17fa2-a4b8-41b5-987a-6ef09f50ddec</a:RequestCode>
            </FindActiveCustomerByVatResult>
        </FindActiveCustomerByVatResponse>
    </s:Body>
</s:Envelope>

i need to get the error code back.




Aucun commentaire:

Enregistrer un commentaire