This content has been marked as final. Show 4 replies
You can specify results format on the webservice as e4x. I think you need not create a value object, you can directly access all data using the XML class.
Take a look at http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00001912.html
Thanks for the reply Guarav.
However, I am using Cairngorm in a rather sizable application. I'm having problems retrieving data from my web service with resultType="object" thus I'm trying "e4x". I need to convert the resulting xml into a value object so I can use them throughout my application.
If you or anyone knows a way to do that easily I would appreciate the help.
To do this dynamically, that is, without knowing the structure of the returned data, would result in a nested structure of dynamic objects, same as what Flex does if you do not specify the result format.
Such a value object would not provide the performance gains that a strongly typed object will. It would also be difficult to navigate and to specify data elements. And it would not be bindable.
In fact, why do you want value to build objects at all? Why not just use the XML nodes directly? What advantage are you looking for from the value objects.
XML is easy to navigate, and IS bindable.
That's twice now I've heard that. lol.
I am using Cairngorm and I suppose out of ignorance perhaps, I am using VO's. So my web service would return an Object Proxy and I have some code that could create objects dynamically from the results. The objects had to be simple of course and now they are becoming more complex thus the need to change to e4x instead of objects.
So now I am trying to convert the xml result into the desired VO to be used throughout the rest of the application. I'm not sure how to use Cairngorm without the VO's they are tied to everything. Are you familiar with the architecture? Your thoughts?