A web service return to my flex3 client this custom exception:
<SOAP-ENV:Fault xmlns:ro="urn:Gov2gLibrary" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:HNS="http://tempuri.org/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v1="http://tempuri.org/">
<faultcode>E2gError</faultcode>
<faultstring>abc</faultstring>
<detail>
<HNS:ROException>
<HNS:Messages>
<HNS:T2gMsg>
<HNS:ID>4545</HNS:ID>
<HNS:Severity>abc</HNS:Severity>
<HNS:Category>abc</HNS:Category>
<HNS:Message1>abc</HNS:Message1>
<HNS:Message2 />
</HNS:T2gMsg>
<HNS:T2gMsg>
<HNS:ID>345344</HNS:ID>
<HNS:Severity>abc</HNS:Severity>
<HNS:Category>abc</HNS:Category>
<HNS:Message1>abc</HNS:Message1>
<HNS:Message2 />
</HNS:T2gMsg>
</HNS:Messages>
</HNS:ROException>
</detail>
</SOAP-ENV:Fault>
This is obviously a part of the FaultEvent object I get when the remote call fail, so I'm trying to access "T2gMsg" subnode values like this:
protected function onFaultEvent(e:FaultEvent):void
{
var obj:Object = e.fault;
var err:XMLList = obj.element.detail.children()[0].children();
// now I have in err the "Messages" list, subnode of ROException,
// so I should cycle to read one message at time:
for each (var x:XML in err.children())
{
//?
}
Now I can't figure out how to read ID, Severity etc values. I think something like "x.ID" should work but it's not, while x.child("ID") or x.elements("ID") return null. What can I do?