This content has been marked as final. Show 7 replies
Don't use "new" with XML. It is really a top-level function and not a constructor.
xml = XML(res.result);
Many thanks for your help. However now the value in my variable xml is
_xml = <ns:returnDataResponse xmlns:ns=" http://read" xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/">
<ns:return type="read.Profile" xmlns:ax21=" http://read/xsd" xmlns:ns=" http://read" xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"/>
rather than the object values that I want. Please help?
SOAP is messy, but your values are almost certainly in there. Find where your data starts. Mine started with a node named DocumentElement. Grab that node into the variable for convenience.
You can now either work directly with the XML using XMLList and XMLListCollection, or you can loop over the xmllist and build an ArrayCollection of objects of your choosing. Best performance is to define a strongly typed value object, populate instances of that and push them onto an array, then wrap the array in an Array collection.
You could also look into Flex Builders Web Service client code generation. It builds strongly typed objects for you. I tried it and chose not to use it for now, as it is pretty complicated and I was working with only strings and numbers anyway.
Once again thanks a lot for not just answering the question but also giving the right directions on how to proceed further.
I have a further Question. Pardon me for my ignorance, are you trying to say that the object i am looking for is somewhere inside the xml variable that i have??? In case that is true, there is a way to read this xml ?? In the debugger, i tried to look through the whole of the result (variable res)that is returned by the service but was unable to locate one.
Hey Guys.... help me out here please.
After debugging, the best I found out is my return type but still couldn't find my data....
here is the path where i found my data
res->target->inherited->encoder->wsdlOpeartion->outputMessage->parts->->type->localName = "Profile"
No data yet...:(