4 Replies Latest reply on Jan 5, 2012 3:42 AM by govind_85

    How to call webservice using flex?

    govind_85 Level 1

      Hello,

      i want to call webservice in flex.i tryied following code.but it is not giving correct response.what is wrong with this code?

      can anybody tell me ,how to call webservice in flex?

       

      Code:

       

      <mx:Script>

              <![CDATA[

      public function button1_clickHandler(event):void

      {

           ws.returnRecord(para1,para2);//i am sending two parameter to returnRecord service here

      }

      public function remotingCFCHandler(event:ResultEvent):void

      {

      trace(event.result);

      }

      ]]>

      </mx:Script>

      <mx:WebService

           id="ws"

           wsdl="http://localhost:8500/flexapp/returnusers.cfc?wsdl">

          <mx:operation name="returnRecords" resultFormat="object"

           fault="mx.controls.Alert.show(event.fault.faultString)"

           result="remotingCFCHandler(event)"/>

      <mx:Button label="Go" fontWeight="bold" click="button1_clickHandler(event)"/>