You really need to take a look at the webservice introspection wizard in FB
3. The code it generates handles asynchronous calls to the webservice
automatically. Click on the Data menu and select Import Web Service
(WSDL)... Follow the directions in the wizard. Only SOAP 1.1 is supported by
the wizard, so be sure to select the correct SOAP version when doing the
import.
~randy
_
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of handitan
Sent: Monday, March 24, 2008 10:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex 3: Cloning WebService instance
With what I want to achieve, webservices that I am referring to are
instances of the same webservices (one single url).
Single WebService instance will not work on my application because my
app sometimes need to call different/same operations concurrently.
I do want to mention the issue I am facing if I am not using the
cloning-approach.
Please take a look at this code:
class CustomWS
{
public getWS():WebService
{
var myWS:WebService = new WebService;
myWS.wsdl = HYPERLINK
http://BoogaBooga/coolFlex.asmx?wsdlhttp://BoogaBooga/-coolFlex.-asmx?wsdl
;
myWS.loadWSDL(-);
}
public populateGridWS(-):void
{
var ws:WebService = getWS();
ws.populateGrid(-);
}
}
As you can see each time getWS() is being called, wsdl needs to be
loaded, which calling HTTP request.
That's why I would like to clone the webservice instance (myWS) after
the wsdl has been loaded so that I can reuse it.
But if you do have other suggestions on how to resolve this in a
better way, I am all ears :)
--- In HYPERLINK
mailto:flexcoders%40yahoogroups.com[EMAIL PROTECTED], Peeyush
Tuli [EMAIL PROTECTED]
wrote:
Still not sure that cloning is the best option, although
centralization
of webservices is a good idea.
When you say webservices, does it mean there is a different wsdl for
each webservice?
Or are they just plain multiple instances of the same webservice(
one
single url)?
A webservice call is operation-centric. So if your flex client does
not
invoke same operations
concurrently and there is a single wsdl to load, you could manage
with a
single webservice
instance for the whole application.
~Peeyush
On Fri, Mar 21, 2008 at 8:50 PM, handitan [EMAIL PROTECTED] wrote:
Hi Peeyush,
It's kind of long to explain it but in short, this is to help me
centralize all my webservice call into one location.
So instead of having mx:WebService / in every component, I am
just
calling webservice from a class that contains all the WebServices.
i.e.
class CustomWS
{
public getWS():WebService
{
//This is where the cloning takes place
}
public populateGridWS(-):void
{
var ws:WebService = getWS();
ws.populateGrid(-);
}
}
Hope this is pretty clear.
--- In HYPERLINK
mailto:flexcoders%40yahoogroups.com[EMAIL PROTECTED]
flexcoders%
40yahoogroups.-com, Peeyush
Tuli peeyush81@
wrote:
Can you let us know the your requirement for doing this?
~Peeyush
On Fri, Mar 21, 2008 at 4:01 AM, handitan handitan@ wrote:
Howdy,
I have been trying to clone a WebService instance with no
result.
Is it really possible to do it?
I have looked on the web and Flex 3 help but I couldn't find
the
way.
I already tried using ObjectUtil.copy(-) but it is not copying
all
the
webservice's members.
Thank you.
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 3/23/2008
6:50 PM