My backend server is changing its web service component from an
RPC/encoded binding to document/literal, and Flash is producing an odd
result when sending complex objects.

 

The short story is this:  the object that I'm sending as a parameter is
complex; it contains an array of objects.  It works fine with the
RPC/encoded binding, but when the document/literal binding is used,
Flash replaces the array of objects with "[Object object],[Object
object],[Object object]".  This is not from a trace, it is the actual
SOAP packet, captured with a TCP sniffer.

 

 

In detail, the object I try to send (a 'Group') is complex; it contains
an array of sub-objects ('User').  The WSDL description for Groups/Users
looks (under RPC) like:

 

<complexType name="Group">

    <sequence>

        <element name="name" nillable="true" type="xsd:string"/>

        <element name="description" nillable="true" type="xsd:string"/>

        <element name="users" nillable="true"
type="impl:ArrayOf_tns1_User"/>

    </sequence>

</complexType>

 

<complexType name="ArrayOf_tns1_User">

    <complexContent>

        <restriction base="soapenc:Array">

            <attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:User[]"/>

        </restriction>

    </complexContent>

</complexType>

 

<complexType name="User">

    <sequence>

        <element name="firstName" nillable="true" type="xsd:string"/>

        <element name="lastName" nillable="true" type="xsd:string"/>

    </sequence>

</complexType>

 

In a document/literal version the WSDL description looks like:

 

<complexType name="Group">

    <sequence>

        <element name=" name " nillable="true" type="string"/>

        <element name="description" nillable="true" type=" string"/>

        <element maxOccurs="unbounded" minOccurs="0" name="users"
nillable="true" type="tns:User"/>

    </sequence>

</complexType>

 

<complexType name="User">

    <sequence>

        <element name="firstName" nillable="true" type=" string"/>

        <element name="lastName" nillable="true" type="string"/>

    </sequence>

</complexType>

 

 

I've directed the web service traffic through a TCP port sniffer to
observe the SOAP packets, and what I see is:

 

For the RPC binding the SOAP object generated by Flash looks
(predictably) like:

 

<in0 xsi:type="ns2:Group">

    <description xsi:type="xsd:string">bbbbbb</description>

    <name xsi:type="xsd:string">aaaa</name>

    <users xsi:type="soapenc:Array" soapenc:arrayType="ns2:User[3]">

        <item xsi:type="ns2:User">

            <firstName xsi:type="xsd:string">Jeff</firstName>

            <lastName xsi:type="xsd:string">Someone</lastName>

        </item>

        <item xsi:type="ns2:User">

            <firstName xsi:type="xsd:string">Eric</firstName>

            <lastName xsi:type="xsd:string">Someoneelse</lastName>

        </item>

        <item xsi:type="ns2:User">

            <firstName xsi:type="xsd:string">Greg</firstName>

            <lastName xsi:type="xsd:string">Nobody</lastName>

        </item>

    </users>

</in0>

 

Now, the object generated with the document/literal binding looks like:

 

<Group_1>

    <name>aaaa</label>

    <description>bbbbbb</description>

    <users>[object Object],[object Object]</users>

</Group _1>

 

 

Anyone ever see this before?

 

Pete

 

 

Knowledge Vector requires me to tell you that:

This message and any attachments contain information from Knowledge
Vector Inc., which may be confidential and/or privileged and is intended
for use only by the addressee (s) named on this transmission.  If you
are not the intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are notified that
any review, copying, distribution or use of this transmission is
strictly prohibited.  If you have received this transmission in error,
please (I) notify the sender immediately by e-mail or by telephone and
(II) destroy all copies of this message.

And I WILL test you by sending you a message in error to see if you read
this.

 

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to