dmws = new WebService();
dmws.loadWSDL(MyWSDLURL);
dmws.useProxy = false;
dmws.addEventListener("result", onDmwsResult);
dmws.addEventListener("fault", doFault);
var op:AbstractOperation;
op = dmws['GetDocument'];
var args:Object = new Object();
args.EnterpriseId = event.target.selectedItem.EnterpriseId;
args.DocumentType = "EBD";
args.ContainersToRetrieve = new Array();
args.ContainersToRetrieve.push("Client");
args.ContainersToRetrieve.push("IndustryTrends");
args.ContainersToRetrieve.push("OptionalSections");
args.ContainersToRetrieve.push("RPRSelections");
args.MetadataToRetrieve = new Array("RPRDocumentHistory");
op.arguments = args;
op.send();
Ben
--- In [email protected], "yomahz" <[EMAIL PROTECTED]> wrote:
>
> When serializing ActionScript objects to XML, it does not appear that
> Flex is properly ordering the elements according the order defined in
> the WSDL. For instance, I have a WSDL with a complext type defined as
> such:
>
> <complexType name='SoapInventory'>
> <sequence>
> <element name='id' nillable='true' type='int'/>
> <element name='inventoryDate' nillable='true' type='dateTime'/>
> <element name='label' nillable='true' type='string'/>
> <element maxOccurs='unbounded' minOccurs='0' name='locations'
> nillable='true' type='ns2:SoapInventoryLocation'/>
> <element name='storeId' nillable='true' type='int'/>
> <element name='type' nillable='true' type='string'/>
> </sequence>
> </complexType>
>
> I also have a ActionScript object defined as:
>
> package com.mycompany.myapp.inventory.model {
> public class SoapInventory {
> public var id:int;
> public var inventoryDate:Date;
> public var label:String;
> public var locations:Array;
> public var storeId:int;
> public var type:String;
> }
> }
>
> Flex serializes this object as:
>
> <SoapInventory_1>
> <ns1:storeId>1012</ns1:storeId>
> <ns1:type xsi:nil='true'/>
> <ns1:label>Test</ns1:label>
> <ns1:id>123</ns1:id>
> <ns1:inventoryDate>2006-04-27T20:52:12.129Z</ns1:inventoryDate>
> </SoapInventory_1>
>
> Which is not the order defined in the WSDL's sequence. Am I doing
> something incorrectly or have I missed something? Here's how I'm
> calling the webservice:
>
>
> ws = new mx.rpc.soap.WebService();
> ws.wsdl = "http://localhost:8080/test/InventoryWebService?wsdl";
> ws.save.addEventListener("result", handleSave);
> ws.addEventListener("fault", handleFault);
> ws.loadWSDL();
> ws.save(soapInventory);
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

