I am building a flex app which has to discuss with a .net
When it comes to retrieving data from the webservice, it
works fine, I send from the asp.net a XMLDocument object and I get
a well formated ObjectProxy under Flex.
What I want to do now is to pass a XMLDocument back to the
.net Service to save Changes.
If I try to pass from Flex the ObjectProxy, I get no error
but the resulting XMLDocument in asp.net is weird.
My question is : is there a way to "serialize" back the
ObjectProxy to a XML that I can then pass safely to the asp.net
Thanks in advance, and feel free to point me at any
litterature about communication between dotnet and flex :)
This is no "built in" way to convert your object proxies back
to XML. It easy to write a simple utility class that will do the
serialize back to xml. Early on (in flex 1.x days)
I did some work on this, but I ultimately concluded that a
standard utility has to make too many assumptions as to the
structure of the xml to get it right consistently. Also you will
find that often times the "automatic" conversion that Flex will do
is not right because of assumptions it makes when doing the
In our case we wrote our own class to represent the entities
we get back from our xml service . So do our own translation
between the object and xml.
It is actually easier to do your own as the e4x Classes make
it really easy to work with the xml coming back.
Below is a link from a Christopher Conraets tutorial that
demonstrates some of this. (This may be a flex 1.5 tutorial, but
the concepts apply)