As you probably realize creating a
WebService in ActionScript is not a supported operation in 1.5. I would check
out the Service Locator pattern that’s implemented with Cairngorm and
discussed in detail in the Developing Rich Clients book.
The approach to asynchronous calls also
might help clarify the kind of things you can do to handle results (the example
uses HTTPService but it applies to all).
http://livedocs.macromedia.com/flex/15/flex_docs_en/00000754.htm
Matt
From: Erik Westra
[mailto:[EMAIL PROTECTED]
Sent: Friday, March 18, 2005 3:14
AM
To: [email protected]
Subject: RE: [flexcoders]
Dynamicly calling a webservice
Two more questions:
1. With the approach u see below, where do I get
my result?
ws.oneMethod(param1, param2);
2. In the classfile definition of Service I see
this constructor:
public function Service(rootURL:String,
wsdlURL:String,
logger:mx.services.Log, proxyURL:String,
parent:Object,
endpointReplacementURI:String, serviceName:String,
portName:String,
pathAppend:String, useProxy:Boolean);
rootURL, what do I fill in here? I guess the rest
is not needed... Any
idea's?
Greetz Erik
-----Original Message-----
Hi,
actually, you don't have to declare all operations
within the WebService
tag - you can invoke a method directly on the
stub:
ws.oneMethod(param1, param2);
or
ws["anotherMethod"](param1,
param2);
or even
ws.thirdMethod.apply(null,
arrayOfArguments);
Does this help?
| Yahoo! Groups Sponsor |
ADVERTISEMENT
![click here]() | |
![]() |
Yahoo! Groups Links