0 Replies Latest reply on Apr 3, 2008 2:15 AM by

    Webservice in Python/soaplib anyone?

      Hello,
      has anyone managed to connect a Flex application to a Webservice implemented with soaplib, a Python webservice library? ( http://trac.optio.webfactional.com/wiki/soaplib) The "Hello, World"-example is easy to setup and call from a Python script ( http://trac.optio.webfactional.com/wiki/HelloWorld), but I fail to call the Webservice from Flex:

      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      verticalGap="10">
      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;

      public function onFault(fevent) : void {
      trace("***", fevent);
      Alert.show(fevent.fault.faultString, 'Error');
      }

      public function opResult(oevent) : void {
      trace("###", oevent);
      Alert.show(oevent.result, 'OK');
      }
      ]]>
      </mx:Script>


      <!-- -->
      <mx:WebService
      id="helloWorldWS"
      wsdl=" http://localhost:7789/soap/api.wsdl"
      useProxy="false"
      result="strList=event.result"
      fault="onFault(event)">
      <mx:operation name="say_hello"
      result="opResult(event)"
      fault="onFault(event)">
      <mx:request>
      <tname>a</tname>
      <times>2</times>
      </mx:request>
      </mx:operation>
      </mx:WebService>
      <!-- -->
      <!--
      <mx:WebService id="helloWorldWS"
      wsdl=" http://localhost:7789/soap/api.wsdl"
      result="opResult(event)"
      fault="onFault(event)">
      <mx:operation name="say_hello"/>
      </mx:WebService>
      -->

      <mx:Button label="Go!" click="helloWorldWS.say_hello.send()"/>
      </mx:Application>

      Hitting "Go!" leads to error: "Required parameter 'say_hello' not found in input arguments."

      Has anyone an idea what is missing in the sample application?

      TIA

      Uwe