1 Reply Latest reply on Jul 3, 2006 12:23 PM by Flex harUI

    webservice doesn't work

    Core_Elements
      ok .. I have a wdsl located at :

      http://www.anti-models.nl/service/test1wsdl.php

      And I have a PHP client script that connects to the wdsl and run the RPC "search" and it returns an array (1 item now). The client is located at http://www.anti-models.nl/service/client.php.

      Now I'm trying to do the same in Flex 2, so like loading the wdsl, run the rpc search and put the results in a datagrid. the example is located at http://www.anti-models.nl/bin/antimodels_test.html.


      Here's my code:

      [code]



      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;
      import mx.utils.*;
      ]]>
      </mx:Script>

      <mx:WebService id='antimodelWS'
      wsdl=" http://www.anti-models.nl/service/test1wsdl.php?wsdl"
      showBusyCursor="true"
      fault="Alert.show(event.fault.faultstring, 'Error');"
      >
      <mx:operation name='search'>
      <mx:request>
      <searchData>
      <category>W</category>
      </searchData>
      </mx:request>
      </mx:operation>

      </mx:WebService>

      <mx:ArrayCollection id="ac"
      source="mx.utils.ArrayUtil.toArray(antimodelWS.search.result)"/>


      <mx:Panel height="95%" width="95%"
      paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">

      <mx:DividedBox direction="horizontal" width="100%" height="100%">


      <mx:Panel title="Search" width="300" height="100%" backgroundColor="0xCCCCCC">
      <mx:Button label="Search" click="antimodelWS.search.send()"/>
      </mx:Panel>

      <mx:Panel title="Panel 2" height="100%" backgroundColor="0xCCCCCC">
      <mx:DataGrid dataProvider="{ac}" width="100%">
      <mx:columns>
      <mx:DataGridColumn dataField="uniq" headerText="Uniq ID"/>
      </mx:columns>
      </mx:DataGrid>
      </mx:Panel>

      </mx:DividedBox>

      </mx:Panel>
      </mx:Application>


      [/code]

      So loading the wdsl isn't the problem, but when I click on "search", nuthing happens .... help?