2 Replies Latest reply on Dec 5, 2006 1:34 PM by karina_a

    web service weather

    karina_a Level 1
      I am new on Flex... and I was trying to make a weather service to work, but i cant find the mistake

      The code is the following:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="WeatherService.GetWeather.send()" >
      <mx:WebService id="WeatherService" wsdl=" http://www.webservicex.net/globalweather.asmx?WSDL" useProxy="false">
      <mx:operation name="GetWeather">
      <mx:request>
      <CityName>{txt_city.text}</CityName>
      <CountryName>{txt_country.text}</CountryName>
      </mx:request>
      </mx:operation>
      </mx:WebService>


      <mx:Panel x="39" y="23" width="476" height="387" layout="absolute">
      <mx:Form x="61" y="42" width="314" height="157">
      <mx:HBox>
      <mx:Label x="96" y="80" text="País :"/>
      <mx:TextInput x="139" y="76" id="txt_country"/>
      </mx:HBox>
      <mx:HBox>
      <mx:Label x="80" y="112" text="Ciudad:"/>
      <mx:TextInput x="139" y="108" id="txt_city"/>
      </mx:HBox>
      <mx:Button x="191" y="160" label="Enviar" click="WeatherService.GetWeather.send()"/>
      </mx:Form>


      <!-- Display the current temperature -->
      <mx:Label text="Temperature:" height="20" y="207"/>
      <mx:TextArea
      text="{WeatherService.GetWeather.lastResult.CurrentWeather.Location}" height="36" y="226" width="314" x="61"/>

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


      tx so much for ur replies,
      Karina