0 Replies Latest reply on Mar 23, 2007 5:36 AM by Mike_Loooo

    Sending Complex Objects to Webservice

    Mike_Loooo

      First of all I'm a newbie so please be gentle ...

      I'm in a process of developing my first Flex application and need to use a SOAP service by passing a complex object to it. Everyhing seems simple and straight forward but my object has different property names from the ones specified in the service wsdl file. Is there any way to tell the serializer to map my object properties to what wsdl is expecting. I wouldn't want to overwrite my class. Below is an example scenario

      in WSDL the service calls for a "TestObject" object and properites "Name" and "Description"

      <soap:Body>
      <AddTest xmlns=" http://www.companyX.com/services/">
      <TestObject>
      <Name>string</Name>
      <Description>string</Description>
      </TestObject>
      </AddQueryTemplate>
      </soap:Body>

      my object is "TestObject" but with properties "name" and "my_description"

      public class TestObject
      {
      public var name:String;
      public var my_description:String

      public function TestObject(name:String,description:String)
      {
      this.name = name;
      this.my_description = description;
      }
      }

      Any help will be appreciated, btw using remoting is not an option