I know it's not much of a help but heres what I do as a debug test
private function init_wsdl():void
{
ws = new WebService();
ws.wsdl = ' http://www.domain.com/path/to/wsdl';
ws.addEventListener(FaultEvent.FAULT, fault_handler);
ws.addEventListener('load', load_handler);
ws.loadWSDL();
}
private function load_handler(event:LoadEvent):void
{
trace('webservice load complete');
}
private function fault_handler(event:FaultEvent):void
{
trace(event.fault.faultString);
}
On 12/08/06,
ben.clinkinbeard <[EMAIL PROTECTED]> wrote:
> Does it compile for you without errors?
Yep, this exact code works for me.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.rpc.soap.LoadEvent;
import mx.rpc.soap.WebService;
private function init():void
{
var myWebService:WebService;
myWebService = new WebService();
myWebService.loadWSDL("http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl ");
myWebService.addEventListener("load", loadComplete);
}
private function loadComplete(event:LoadEvent):void
{
trace("ALL GOOD");
}
]]>
</mx:Script>
</mx:Application>
>
> -----Original Message-----
> From: [email protected] [mailto: [email protected]] On
> Behalf Of ben.clinkinbeard
> Sent: Friday, August 11, 2006 12:42 PM
> To: [email protected]
> Subject: [flexcoders] Re: WebService - What's wrong with this code?
>
> For your second example, if you wrap the lines other than the import
> inside of a function it should work.
>
> HTH,
> Ben
>
> --- In [email protected], "Tom Lee" <design@> wrote:
> >
> > I can't figure this out for the life of me - I'm following other
> people's
> > examples, but still getting errors. This must be something obvious.
> Here's
> > my code (I've removed the actual WSDL url):
> >
> >
> >
> > <?xml version="1.0" encoding="utf-8"?>
> >
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute">
> >
> > <mx:Script>
> >
> > <![CDATA[
> >
> > import mx.rpc.soap.WebService;
> >
> > var myWebService:WebService;
> >
> > function initWS(){
> >
> > myWebService = new
> > WebService();
> >
> >
> > myWebService.loadWSDL("**********************");
> >
> > }
> >
> > ]]>
> >
> > </mx:Script>
> >
> > </mx:Application>
> >
> >
> >
> >
> >
> > And here's my error:
> >
> >
> >
> > 1061: Call to a possibly undefined method loadWSDL through a
> reference with
> > static type WebService. (Line 9)
> >
> >
> >
> > I've tried a bunch of different stuff - here's another variation,
which
> > throws different errors:
> >
> >
> >
> > <?xml version="1.0" encoding="utf-8"?>
> >
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute">
> >
> > <mx:Script>
> >
> > <![CDATA[
> >
> > import mx.rpc.soap.WebService;
> >
> > var myWebService:WebService;
> >
> >
> >
> > myWebService = new WebService();
> >
> >
> > myWebService.loadWSDL("******************************");
> >
> >
> >
> > ]]>
> >
> > </mx:Script>
> >
> > </mx:Application>
> >
> >
> >
> > And the errors:
> >
> >
> >
> > 1120: Access of undefined property myWebService. (Lines 8 & 9)
> >
> >
> >
> > Thanks!
> >
> >
> >
> > - tom
> >
>
>
>
>
>
>
> --
> 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
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- RE: [flexcoders] Re: WebService - What's wrong with this ... Tom Lee
- [flexcoders] Re: WebService - What's wrong with this... ben.clinkinbeard
- Re: [flexcoders] Re: WebService - What's wrong w... sinatosk
- RE: [flexcoders] Re: WebService - What's wrong w... Tom Lee
- Re: [flexcoders] Re: WebService - What's wro... sinatosk
- Re: [flexcoders] Re: WebService - What's... Samuel D. Colak
- Re: [flexcoders] Re: WebService - What's wrong with ... Samuel D. Colak
- [flexcoders] Re: WebService - What's wrong with ... ben.clinkinbeard
- RE: [flexcoders] Re: WebService - What's wro... Tom Lee
- RE: [flexcoders] Re: WebService - What's... Franck de Bruijn
- RE: [flexcoders] Re: WebService - W... Seth Hodgson
- RE: [flexcoders] Re: WebService... Franck de Bruijn
- [flexcoders] Re: WebService... ben.clinkinbeard
Reply via email to

