4 Replies Latest reply on Dec 9, 2008 5:53 AM by Gene Godsey

    Data Not Pulling

    Gene Godsey Level 1
      Here is the application code.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">

      <mx:Script>
      <![CDATA[
      import mx.rpc.events.ResultEvent;
      import mx.collections.ArrayCollection;
      [Bindable]
      private var myQuery:ArrayCollection;

      private function genesWebService(event:ResultEvent):void{
      myQuery = event.result as ArrayCollection;
      }
      ]]>
      </mx:Script>

      <mx:WebService id="myService" wsdl=" http://localhost/cftest/helloWorld.cfc?wsdl"
      result="genesWebService(event)"/>

      <mx:Button label="Get Data" click="myService.myQuery()"/>

      <mx:DataGrid dataProvider="{myQuery}">
      <mx:columns>
      <mx:DataGridColumn dataField="nameofcomputer" headerText="Computer"/>
      <mx:DataGridColumn dataField="puser" headerText="User"/>
      <mx:DataGridColumn dataField="serialnumber" headerText="Serial"/>
      </mx:columns>
      </mx:DataGrid>

      </mx:Application>
      .

      This is the WSDL file:
      <?xml version="1.0" encoding="UTF-8" ?>
      - <wsdl:definitions targetNamespace=" http://cftest" xmlns:apachesoap=" http://xml.apache.org/xml-soap" xmlns:impl=" http://cftest" xmlns:intf=" http://cftest" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1=" http://rpc.xml.coldfusion" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
      - <!-- WSDL created by ColdFusion version 8,0,1,195765
      -->
      - <wsdl:types>
      - <schema targetNamespace=" http://cftest" xmlns=" http://www.w3.org/2001/XMLSchema">
      <import namespace=" http://rpc.xml.coldfusion" />
      <import namespace=" http://schemas.xmlsoap.org/soap/encoding/" />
      - <complexType name="ArrayOf_xsd_string">
      - <complexContent>
      - <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" />
      </restriction>
      </complexContent>
      </complexType>
      - <complexType name="ArrayOfArrayOf_xsd_anyType">
      - <complexContent>
      + <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[][]" />
      </restriction>
      </complexContent>
      </complexType>
      </schema>
      - <schema targetNamespace=" http://rpc.xml.coldfusion" xmlns=" http://www.w3.org/2001/XMLSchema">
      <import namespace=" http://cftest" />
      <import namespace=" http://schemas.xmlsoap.org/soap/encoding/" />
      - <complexType name="QueryBean">
      - <sequence>
      <element name="columnList" nillable="true" type="impl:ArrayOf_xsd_string" />
      <element name="data" nillable="true" type="impl:ArrayOfArrayOf_xsd_anyType" />
      </sequence>
      </complexType>
      - <complexType name="CFCInvocationException">
      <sequence />
      </complexType>
      </schema>
      </wsdl:types>
      - <wsdl:message name="myQueryResponse">
      <wsdl:part name="myQueryReturn" type="tns1:QueryBean" />
      </wsdl:message>
      <wsdl:message name="myQueryRequest" />
      - <wsdl:message name="CFCInvocationException">
      <wsdl:part name="fault" type="tns1:CFCInvocationException" />
      </wsdl:message>
      - <wsdl:portType name="HelloWorld">
      - <wsdl:operation name="myQuery">
      <wsdl:input message="impl:myQueryRequest" name="myQueryRequest" />
      <wsdl:output message="impl:myQueryResponse" name="myQueryResponse" />
      <wsdl:fault message="impl:CFCInvocationException" name="CFCInvocationException" />
      </wsdl:operation>
      </wsdl:portType>
      - <wsdl:binding name="helloWorld.cfcSoapBinding" type="impl:HelloWorld">
      <wsdlsoap:binding style="rpc" transport=" http://schemas.xmlsoap.org/soap/http" />
      - <wsdl:operation name="myQuery">
      <wsdlsoap:operation soapAction="" />
      - <wsdl:input name="myQueryRequest">
      <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" namespace=" http://cftest" use="encoded" />
      </wsdl:input>
      - <wsdl:output name="myQueryResponse">
      <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" namespace=" http://cftest" use="encoded" />
      </wsdl:output>
      - <wsdl:fault name="CFCInvocationException">
      <wsdlsoap:fault encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" name="CFCInvocationException" namespace=" http://cftest" use="encoded" />
      </wsdl:fault>
      </wsdl:operation>
      </wsdl:binding>
      - <wsdl:service name="HelloWorldService">
      - <wsdl:port binding="impl:helloWorld.cfcSoapBinding" name="helloWorld.cfc">
      <wsdlsoap:address location=" http://localhost/cftest/helloWorld.cfc" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      The data does not display in the Data grid.
      Any Idea's with this?

      Thanks