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 = "http://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 flexcoders@yahoogroups.com, "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 flexcoders@yahoogroups.com <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. > > > > > > > > > > > > > > > > > > > > > >