2 Replies Latest reply on Feb 15, 2007 11:45 PM by moslebrut

    passing parameters to soap WebService

    moslebrut

      Hi to everybody,
      I'm a newbie in flex builder 2 and, as expected ;-), I've a problem related to a WebService using SOAP interface.
      I'd like to pass some parameters to my WS directly into the ws.send() function.

      In a HttpService I did it as follows:

      <mx:HTTPService id="testEditSW" url=" http://172.26.99.2/test/edit.php" method="POST" useProxy="false"/>

      private myfunction():void
      {
      ...
      testEditSW.send({field: myfield,value: myvalue, key:mykey});
      ...
      }

      and all worked fine.

      I wasn't able to do the same calling a WebService. The only (terrible) way I found is the following

      <mx:WebService id="soapEdit" wsdl=" http://172.26.99.2/test/fidsService.wsdl" useProxy="false">
      <mx:operation name="Update">
      <mx:request>
      <field>{lblfield.text}</field>
      <value>{lblvalue.text}</value>
      <keyfield>{lblkeyfield.text}</keyfield>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      where lblfield, lblvalue, lblkeyfield are labels widget that I fill with the right values before call the WebService using

      soapEdit.Update.send();

      If I try to call my WebService using soapEdit.Update.send({field:myfield,value:myvalue,keyfield:mykeyfield});
      flex returns the error
      [RPC Fault faultString="Array of input arguments did not contain a required parameter at position 1" faultCode="Client.Input" faultDetail="null"]

      Any suggestion on how to solve my problem?

      Thank you in advance for your help.