I have found numerous explanations about how SoapClient expects you to set attributes in a request, but I simply cannot find a way to read attributes from a response.
For example, my SoapClient response has these elements in it:
...
<ns:index>
<ns:uid expdate="2013-09-03 14:30:00">JOWtest002</ns:uid>
<ns:uid expdate="2013-02-07 15:00:00">JOWtest003</ns:uid>
</ns:index>
...
However, the "expdate" attribute is never attached to the "index" stdClass
["index"]=>
object(stdClass)#80 (1) {
["uid"]=>
array(2) {
[0]=>
string(10) "JOWtest002"
[1]=>
string(10) "JOWtest003"
}
}
I have tried using a SoapClient classmap to bind this to an object, but unfortunately, the WSDL does not define the "uid" element as a complexType, so it does not map the attributes either. Binding "index" itself to a class doesn't work.
Any suggestions? I really want to avoid parsing the XML by giving it to SimpleXML or DOMDocument.