I am trying to write some error handling for a SOAP call and the detail member of the SOAP fault is not being completely parsed. I cannot publish the WSDL as it is a private WSDL and requires authentication. Here is the SOAP fault XML and a print_r of the resulting fault object. Note that the apiFault is included in the Fault object, but it is empty, none of the attributes have been included. The schema for the apiFault is included and properly defines the attributes.
Can anyone come up with a reason why the apiFault is not being fully parsed?
SOAP Fault XML:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>
soap:Server
</faultcode>
<faultstring>
Fault occurred while processing.
</faultstring>
<detail>
<ns9:apiFault
errorCode="item not found"
objectName="903857243"
objectType="content"
xmlns:ns2="http://contenthierarchy.transport.v1.api.cmpublish.clickability.com"
xmlns:ns3="http://media.transport.v1.api.cmpublish.clickability.com"
xmlns:ns4="http://categorization.transport.v1.api.cmpublish.clickability.com"
xmlns:ns5="http://content.transport.v1.api.cmpublish.clickability.com"
xmlns:ns6="http://subscriber.transport.v1.api.cmpublish.clickability.com"
xmlns:ns7="http://placement.transport.v1.api.cmpublish.clickability.com"
xmlns:ns8="http://linkedcontent.transport.v1.api.cmpublish.clickability.com"
xmlns:ns9="http://transport.v1.api.cmpublish.clickability.com"/>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
print_r result:
SoapFault Object
(
[message:protected] => Fault occurred while processing.
[string:private] =>
[code:protected] => 0
[file:protected] => C:\Documents and Settings\anderkj\My Documents\Aptana Studio Workspace\htdocs\test\kelly\soap_example.php
[line:protected] => 37
[trace:private] => Array
(
[0] => Array
(
[file] => C:\Documents and Settings\anderkj\My Documents\Aptana Studio Workspace\htdocs\test\kelly\soap_example.php
[line] => 37
[function] => __soapCall
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => getContent
[1] => Array
(
[parameters] => Array
(
[contentID] => 903857243
)
)
[2] =>
[3] => SoapHeader Object
(
[namespace] => http://credential.transport.v1.api.cmpublish.clickability.com
[name] => credentials username="[email protected]" password="Pe6Ra7aX" customerID="8500397"
[data] =>
[mustUnderstand] =>
)
)
)
)
[faultstring] => Fault occurred while processing.
[faultcode] => soap:Server
[detail] => stdClass Object
(
[apiFault] =>
)
)