0 Replies Latest reply on May 23, 2012 7:38 PM by Purushotham Nayak

    Cloning/Copying Webservice

    Purushotham Nayak

      Is it possible to do the following with webservice ? When run via debugger both pws and ws are null in the constructor.

       

      In main.mxml

         

           public var ws:Webservice

       

           <fx:Script>

           ws = new WebService();

           ws.addEventListener(FaultEvent.FAULT, onFault);

           ws.addEventListener(LoadEvent.LOAD, onLoad);

           var sc:someclass = new someclass(ws);

           sc.useWs();

           </fx:Script>

          

       

      In someclass.as

       

      public class someclass

      {

           private var pws:Webservice;

           public function someclass(ws:WebService)

           {

                pws = ws;

           }

       

           private function useWs()

           {

                // use pws

           }

      }

       

      .