php - How to retrieve the headers from a SoapFault -
i'm using php's soapclient connect webservice (which out of control). 1 of soapfaults i'm receiving follows (formatted readability):
<?xml version="1.0" encoding="utf-8"?> <s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:header> <infolog xmlns="infolog" xmlns:i="http://www.w3.org/2001/xmlschema-instance"> <infologmessage xmlns="http://schemas.datacontract.org/2004/07/microsoft.dynamics.ax.framework.services"> <infologmessagetype>error</infologmessagetype> <message>customer 6729 not found.</message> </infologmessage> </infolog> </s:header> <s:body> <s:fault> <faultcode>s:client</faultcode> <faultstring xml:lang="en-us">request failed. see exception log details.</faultstring> <detail xmlns:s="http://www.w3.org/2003/05/soap-envelope"> <aiffault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/fault" xmlns:i="http://www.w3.org/2001/xmlschema-instance"> <customdetailxml i:nil="true" /> <faultmessagelistarray i:nil="true" /> <infologmessagelist xmlns:b="http://schemas.datacontract.org/2004/07/microsoft.dynamics.ax.framework.services" i:nil="true" /> <stacktrace i:nil="true" /> <xppexceptiontype>3</xppexceptiontype> </aiffault> </detail> </s:fault> </s:body> </s:envelope>
when php throws soapfault exception, message request failed. see exception log details.
expected. need infolog
entry header
. there way retrieve header params, other calling __getlastresponse() , parsing entire xml myself, seems clunky?
i open switching client libraries if - i've far tried native php soapclient , zend\soap\client
Comments
Post a Comment