Is “successfulCall()” getting called?
The result event passes an event object to
the handler, and event.lastResult has your returned data. Use that to
examine the structure of your returned data.
successfulCall(event:ResultEvent):void
Tracy
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of judah
Sent: Tuesday, May 16, 2006 1:00
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Wanted -
A simple WSDL example
That is an awesome link. I will use that. My problem
is getting them to work in Flex. This is really a newbie question but I don't
know how to take that information on that site and put it into Flex. I've
looked at the help, I've tried to apply it and I cannot see what I'm doing
wrong. I'm pulling out my hair (insert hair pulling emoticon here).
Here is my code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:WebService id="WeatherService"
wsdl="http://www.jasongaylord.com/webservices/zipcodes.asmx?wsdl"
result="successfulCall();" fault="errorCall();"
useProxy="false">
<mx:operation
name="ZipCodeToDetails">
<mx:request>
<ZipCode>{zipCode.text}</ZipCode>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:Script>
<![CDATA[
private
function processValues():void {
//mx.controls.Alert.show("Sending data!", "Alert Box",
mx.controls.Alert.OK);
// Check to see if ZIP code is valid.
WeatherService.GetWeather.send();
}
private
function successfulCall():void
{
mx.controls.Alert.show("Web service sucessful!", "Alert
Box", mx.controls.Alert.OK);
vs1.selectedIndex=1;
}
private
function errorCall():void {
mx.controls.Alert.show("Web service failed!", "Alert Box",
mx.controls.Alert.OK);
}
]]>
</mx:Script>
<mx:ViewStack id="vs1">
<mx:Form>
<mx:FormItem label="Zip
Code">
<mx:TextInput id="zipCode" width="200"
text="50613"/>
<mx:Button width="60" label="Submit"
click="processValues();"/>
</mx:FormItem>
</mx:Form>
<mx:VBox>
<mx:TextArea text="{WeatherService.GetWeather.result.CityShortName}"/>
<mx:TextArea
text="{WeatherService.GetWeather.result.CurrentTemp}"/>
</mx:VBox>
</mx:ViewStack>
</mx:Application>
John C. Bland II wrote:
Anytime I need to look at
or test a wsdl I always go to xmethods.net.
--
John C. Bland II
"I do what I can do when I can do it." - Chris Tucker, Money Talks
http://www.gotoandstop.org - Home of
FMUG.az
--
"Always bear in mind that your own resolution to succeed is more important than any one thing."
"You can have anything you want - if you want it badly enough. You can be anything you want to be, do anything you set out to accomplish if you hold to that desire with singleness of purpose."
- Abraham Lincoln
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS