2 Replies Latest reply on Nov 8, 2006 9:31 AM by Jumru

    Webservice Response

    Jumru
      Hi Flex Experts,

      I have a sample webservice which returns the following response.

      <element name="GetCustResponse">
      <complexType>
      <sequence>
      <element maxOccurs="unbounded" name="GetCustItem" nillable="true">
      <complexType>
      <sequence>
      <element name="id" nillable="true" type="xsd:string" />

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

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

      <element name="SqlStateResponse" nillable="true" type="tns1:SqlStateResponse" />
      </sequence>
      </complexType>
      </element>


      Based on the above response definition I should expect to see result as follows : (There are 3 GetCustItem records)

      result = mx.utils.ObjectProxy
      GetCustItem = mx.collections.ArrayCollections
      [0] = mx.collections.ArrayCollections
      [1] = mx.collections.ArrayCollections
      [2] = mx.collections.ArrayCollections

      SqlStateResponse = mx.utils.ObjectProxy

      But instead I am seeing the following : Basically the first GetCustItem is treated as a column header!!!

      result = mx.utils.ObjectProxy
      GetCustItem = mx.collections.ArrayCollections
      [0] = mx.rpc.xml.ComplexString
      [1] = mx.rpc.xml.ComplexString
      [2] = mx.rpc.xml.ComplexString
      [3] = mx.collections.ArrayCollections
      [4] = mx.collections.ArrayCollections

      SqlStateResponse = mx.utils.ObjectProxy

      Any comments ? Could be a problem with the Flex Client side API ?

      Thanks In Advance
        • 1. Re: Webservice Response
          ntsiii Level 3
          I am not understanding your analysis, for example, what does:
          result = mx.utils.ObjectProxy
          mean? Or any of the lines which follow, for that matter?

          Does the xml returned really not include a root element?

          How are you attempting to display this data?

          Tracy
          • 2. Re: Webservice Response
            Jumru Level 1
            OK.. I should have been more specific. The output I have shown is from the DEBUG view of the Flex Builder and it's the result object of the ResultEvent. The mapping shows how the response objects are treated within the Flash world.

            So in effect the client side Flash API is messing up the response as it's converting the first array collection of customer details as column header for the data.

            Let me know if you need more details.

            Thanks