I am calling a web service with the resultFormat set to e4x. When i get the result, it is in XML format. What I need is to convert this to a custom type Value Object (which is actually a class generated from WSDL). I was not finding a way to do this. So I used a SimpleXMLDecoder to decode it to a generic Object. Now my problem is that all the nested objects inside this generic Object are of type "ObjectProxy". So i cannot convert them to my nested value objects.
So now what I finally need is either of the following 2 things:
1. A way to convert the ObjectProxy to my custom type Value Object.
2. A way to directly parse the result XML to my Custom type Value Object.
Please let me know if I need to provide some more clarification.
Thanks in advance!!
Just some ideas
You could loop through the xml and assign the values to the properties of your custom object.
I also THINK (no access to Flex at the mo) that if you cast the result to a generic Object it will create properties matching the xmls.
However thats no use if you have a custom class you want. I'm sure more xml proficient people will respond.
Thanks alot for your response Andrew.
The problem is that when I cast the result directly to the Generic type Object, I get all the properties in XML format and I would again have to manually code to get the values into a Custom type Object and my XML is too huge to do that.