2 Replies Latest reply on May 14, 2009 7:25 PM by wzxie

    How to pass complex data type structure to WebService under mx:request?

    wzxie

      From my Flex client, I need to pass data to a web service whose operation expects a complex data type with multiple layers of nesting structure. How can I populate the <mx:request> for the <mx:WebServices>? Any examples?

       

      A couple of approaches come to my mind:

      (1) construct ActionScript object to mimic the datatype expected by web service, and pass an instance of the AS object to mx:request; or
      (2) construct an entire SOAP request body in XML and pass it into mx:request.

       

      Does any of these (or both) work? If both work, which is the better way?

       

      Thanks in advance for your input!

       

      -William