Thank you so much, I was so focused on figuring out the SOAP stuff that when I started writing the project I totally forgot to create the methods. Thanks for the example as well, it helped out a whole lot.
----- Original Message ---- From: Kevin Fauth <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, August 28, 2008 2:45:03 PM Subject: [flexcoders] Re: WSDL & SOAP basicasm- You have your calls in the base of the class, you need to move it into a method. You should also put your "add event listener" into an "onInit()" type of call. Here's a quick example: <?xml version="1.0" encoding="utf- 8"?> <mx:Application xmlns:mx="http://www.adobe. com/2006/ mxml" layout="absolute" creationComplete= "onInit() "> <mx:Script> <![CDATA[ import mx.rpc.events. FaultEvent; import net.webservicex. GetWeatherResult Event; import net.webservicex. GlobalWeather; private var weather : GlobalWeather = new GlobalWeather; private function onInit():void { weather.addgetWeath erEventListener( handleWeather) ; weather.addGlobalWe atherFaultEventL istener(onFault) ; } private function onClick():void { weather.getWeather( "Spokane" ,"United States"); } private function handleWeather( e:GetWeatherResu ltEvent): void { trace(e.result. toString( )); } private function onFault(e:FaultEven t):void { trace("Fault: " + e.message); } ]]> </mx:Script> <mx:Button click="onClick( )" label="Click Me" /> </mx:Application> --- In [EMAIL PROTECTED] ups.com, "basicasm" <[EMAIL PROTECTED] .> wrote: > > I am trying to access a web service with Flex. So far I can import the > WSDL just fine using the webservice import wizard. (File->Import- >Web > Service) But when I try to use one of the methods from the WSDL Flex > tells me that I am trying to access an undefined property of the service. > > /* code > > import net.webservicex. BaseGlobalWeathe r; > import mx.rpc.events. ResultEvent; > import net.webservicex. GetWeatherResult Event; > import net.webservicex. GlobalWeather; > > private var weather:GlobalWeath er = new GlobalWeather; > # weather.getWeather( "Spokane" , "United States"); > # weather.addgetWeath erEventListener( handleWeather) ; > private function handleWeather( event:ResultEven t):void > { > trace(event. result); > } > */ > > The lines causing the problem are marked with '#'. You can view the > WSDL that I am working with at > http://www.webservi cex.net/globalwe ather.asmx? wsdl > > and I am trying to follow the example from http://www.flexlive .net/?p=79 > > Any help is appreciated, thank you. >

