2 Replies Latest reply on May 28, 2009 10:04 AM by oldMster

    WebService

    nofortee

      hi....

       

      I have a webservice mxml tag below:

       

      <mx:WebService id="ws" wsdl="http://URL/?WSDL">
          <mx:operation name="InsertData">
              <mx:request>
                  <account>data1</account>

                  <email>data2</email>

              </mx:request>
          </mx:operation>
      </mx:WebService>

       

      I was wondering that is any posibility to declare and manipulate this

      webservice in AS class. point me some,please....

       

      Any comment will be appreciated.

      Thanks

        • 1. Re: WebService
          BennyBeta Level 4

          The ActionScript class is: mx.rpc.soap.WebService

          1 person found this helpful
          • 2. Re: WebService
            oldMster Level 3

            Sure, anything that can be done with an <mx: tag can be done in AS.

             

            <mx:Script>

                 <![CDATA[

             

                 private var ws:WebService = new WebService();

                 //note that when defining with AS, the variable name assigned works like the id='ws'

             

             

             

                private function initWS():void {

                      ws.wsdl = "http://URL/?WSDL";

                      //set rest of properties

                      //I think ws.getOperation("InsertData");

                      //ws.InsertData.arguments.account="data1";

                      //ws.InsertData.arguments.email="data2";

                      //ws.send()

                      //but i don't use WebServices, so someone else may have better advice on this part.

             

                 ]]>

            </mx:Script>