wsPubTypes.getPubTypes.send() instead of wsPubTypes.getPubTypes();
------
Sherif Abdou
http://VadexFX.com
http://Sherifabdou.com
  ----- Original Message ----- 
  From: Chris Doherty 
  To: flexcoders@yahoogroups.com 
  Sent: Tuesday, September 02, 2008 5:07 PM
  Subject: [flexcoders] Webservice not invoking???


  I have a module that employs a web service to get data from a cold
  fusion component. I make the request of the web service, but the web
  service never fires the invoke event and the data is never retreived.
  Any suggestions? Any help is very much appreciated.

  Thanks,
  Chris

  <?xml version="1.0" encoding="utf-8"?>
  <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical"
  width="100%" height="100%" horizontalAlign="center"
  creationCompleteEffect="{fadeIn}" creationComplete="onInit()">
  <mx:Script>
  <![CDATA[
  import mbm.utility.WSDL.WSDLMapper;
  import mx.utils.ObjectUtil;
  import mx.controls.Alert;
  import mx.core.Application;
  import flash.events.TextEvent;
  import mx.rpc.events.ResultEvent;

  internal function onInit():void {
  getPubTypes();
  }

  internal function getPubTypes():void {
  wsPubTypes.wsdl = "http://localhost/wsBiblioMaintenance.cfc?wsdl";;
  wsPubTypes.addEventListener(ResultEvent.RESULT, pubTypesReceived);
  wsPubTypes.getPubTypes();
  }

  internal function pubTypesReceived(event:Event):void {
  wsPubTypes.removeEventListener(ResultEvent.RESULT, pubTypesReceived);
  Alert.show("Data Received.");
  }
  ]]>
  </mx:Script>

  <mx:WebService 
  id="wsJournals" 
  showBusyCursor="true"
  fault="mx.controls.Alert.show('Unable to get journal list.')" 
  invoke="mx.controls.Alert.show('About to get journal list.')" 
  result="this.enabled = true"/>

  <mx:WebService 
  id="wsPubTypes" 
  showBusyCursor="true"
  fault="mx.controls.Alert.show('Unable to get publication type list.')" 
  result="this.enabled = true"/>

  <mx:Fade id="fadeIn" duration="2500" alphaFrom="0.0" alphaTo="1.0"/>
  <mx:Fade id="fadeOut" duration="500" alphaFrom="1.0" alphaTo="0.0"/>

  <mx:ToggleButtonBar dataProvider="{viewstack}"
  horizontalAlign="center" disabledColor="white" />


  <mx:ViewStack id="viewstack" width="200" height="200" >
  <mx:VBox id="vboxPublicationTypes" label="Publication Types"
  width="100%" height="100%" showEffect="{fadeIn}">
  <mx:DataGrid id="datagridPublicationTypes" width="100%"
  height="100%" dataProvider="{wsPubTypes.getPubTypes.lastResult}" >
  <mx:columns>
  <mx:DataGridColumn headerText="Publication Type"
  dataField="PUBTYPEDESC"/>
  <mx:DataGridColumn headerText="Publication Type Match"
  dataField="PUBTYPEMATCH"/>
  <mx:DataGridColumn headerText="Abbreviation"
  dataField="ABBREVIATION"/>
  <mx:DataGridColumn headerText="Refereed" dataField="REFEREED"/>
  <mx:DataGridColumn headerText="ISSN" dataField="ISSN"/>
  </mx:columns>
  </mx:DataGrid>
  </mx:VBox>
  <mx:VBox id="vboxJournals" label="Journals" width="100%"
  height="100%" showEffect="{fadeIn}">
  <mx:DataGrid id="datagridJournals" width="100%" height="100%">
  <mx:columns>
  <mx:DataGridColumn headerText="Name" dataField="NAME"/>
  <mx:DataGridColumn headerText="Country" dataField="COUNTRY"/>
  <mx:DataGridColumn headerText="Abbreviation"
  dataField="ABBREVIATION"/>
  <mx:DataGridColumn headerText="Refereed" dataField="REFEREED"/>
  <mx:DataGridColumn headerText="ISSN" dataField="ISSN"/>
  </mx:columns>
  </mx:DataGrid> 
  </mx:VBox>
  <mx:VBox id="pendingDownloads" label="Pending Downloads"
  width="100%" height="100%" showEffect="{fadeIn}">
  </mx:VBox>
  <mx:VBox id="orphanedRecords" label="Orphaned Records" width="100%"
  height="100%" showEffect="{fadeIn}">
  </mx:VBox>
  <mx:VBox id="missingSortDates" label="Missing Sort Dates"
  width="100%" height="100%" showEffect="{fadeIn}">
  </mx:VBox>
  <mx:VBox id="automatedBolding" label="Automated Bolding"
  width="100%" height="100%" showEffect="{fadeIn}">
  </mx:VBox>
  <mx:VBox id="downloadRestriction" label="Download Restriction"
  width="100%" height="100%" showEffect="{fadeIn}">
  </mx:VBox>
  </mx:ViewStack>
  <mx:Button label="Button" click="getPubTypes()"/>

  </mx:Module>



   

Reply via email to