0 Replies Latest reply on Aug 12, 2008 5:09 AM by yogesh_csc

    Getting started with webservice .

    yogesh_csc
      Hi , I have started with using the webservice thru wsdl .
      I am trying to access one of the operation of Tempconvert webservice of w3schools .

      Here is the code I have return in eclipe .
      When I am running it as flex application and giving the value in the text box nothing happens please let me know how to debug and any changes if required .

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:WebService id="test" wsdl=" http://www.w3schools.com/webservices/tempconvert.asmx?WSDL" useProxy="false">
      <mx:operation name="FahrenheitToCelsius">
      <mx:request>
      <Fahrenheit>{inputText.text}</Fahrenheit>
      </mx:request></mx:operation>
      </mx:WebService>
      <mx:Script>
      <![CDATA[
      private function processValues():void {
      // Check to see if ZIP code is valid.
      test.FahrenheitToCelsius.send();
      }
      ]]>
      </mx:Script>

      <mx:Panel title="My Web Application" paddingTop="10" paddingBottom="10"
      paddingLeft="10" paddingRight="10" >
      <!-- Provide a ZIP code in a TextInput control. -->
      <mx:TextInput id="inputText" width="200" text="enter ?"/>
      <!-- Call the web service operation with a Button click. -->
      <mx:Button width="60" label="Get"
      click="processValues();"/>
      <!-- Display the location for the specified ZIP code. -->
      <mx:Label text="Celcius:"/>
      <mx:TextArea text="{test.FahrenheitToCelsius.lastResult.FahrenheitToCelsiusResult}"/>
      <!-- Display the current temperature for the specified ZIP code. -->

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