#how to change SOAP response body when theres an error?

1 messages · Page 1 of 1 (latest)

meager fjord
#

hey guys. i have SOAP service. if i call it and everythings ok, i return this response:

<SOAP-ENV:Body>
<ns1:idcheckResponse>
<status xsi:type="xsd:string">0</status>
<amount xsi:type="xsd:string">1176</amount>
<error_desc xsi:type="xsd:string"></error_desc>
<trans_id xsi:type="xsd:string">11000000035</trans_id>
<postpaid_invoice_data xsi:type="xsd:string">0</postpaid_invoice_data>
</ns1:idcheckResponse>
</SOAP-ENV:Body>

but if smth is wrong, i return this:

 <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>SOAP-ENV:Server</faultcode>
            <faultstring xml:lang="en">Duplicate request.UserId:903.TransactionId:111</faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>

so i was wondering, if i have an error how can i return the same status , amount, and other fields in my error response? any ideas? thanks

echo relicBOT
#

<@&1004656351647117403> please have a look, thanks.