0 Replies Latest reply on Nov 13, 2007 6:54 AM by ebelair

    Accessing Query ColumnList in Array Collection

    ebelair
      I want to get the Column names in a query object returned from a WebService as an Array Collection.

      I have a WebService that is returning the following SOAP data:

      <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <ns1:sStockQuotesResponse soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1=" http://cfc.private">
      <sStockQuotesReturn xsi:type="ns2:QueryBean" xmlns:ns2=" http://rpc.xml.coldfusion">
      <columnList soapenc:arrayType="xsd:string[4]" xsi:type="soapenc:Array" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/">
      <columnList xsi:type="xsd:string">name</columnList>
      <columnList xsi:type="xsd:string">symbol</columnList>
      <columnList xsi:type="xsd:string">lastprice</columnList>
      <columnList xsi:type="xsd:string">lastpricedate</columnList>
      </columnList>
      <data soapenc:arrayType="xsd:anyType[][7]" xsi:type="soapenc:Array" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/">
      <data soapenc:arrayType="xsd:anyType[4]" xsi:type="soapenc:Array">
      <data xsi:type="soapenc:string">ALCOA INC</data>
      <data xsi:type="soapenc:string">AA</data>
      <data xsi:type="soapenc:string">35.87</data>
      <data xsi:type="soapenc:string">11/12/2007 4:00pm</data>
      </data>
      </data>
      </sStockQuotesReturn>
      </ns1:sStockQuotesResponse>
      </soapenv:Body>
      </soapenv:Envelope>

      I have no problem converting the data to a Flex Array Collection, and populating a DataGrid with this data.

      However, I want to grab the Column Names, so that I can create the DataGrid columns dynamically. I have searched the FB3 documentation, but cannot find an answer. Please help.

      Thank you.

      Eric.