7 Replies Latest reply on Aug 15, 2007 9:39 AM by kissmyAS3

    Webservices with Flash CS3 / AS3

    marcusw1234 Level 1
      Hi,

      I'm migrating an app from AS2 to AS3, which has fairly substantial use of webservices using the as2 Webservice classes.

      Is there an AS3 equivalent for these classes? I read on one forum that there is nothing provided for webservices in AS3, and you'd have to serialize/deserialize the soap packets manually yourself - surely this can't be the case?!

      thanks
      Marcus.
        • 1. Re: Webservices with Flash CS3 / AS3
          marcusw1234 Level 1
          Hello? Does anyone have any info on how to connect to a webservice in Flash CS3 with AS3? I have searched everywhere and can't find anything!

          I can only assume i'm missing something here - is there some less obvious package provided that does the connecting and serializing for you? Flex has the mx.rpc package, but I can't find anything that resembles that in Flash!
          • 2. Re: Webservices with Flash CS3 / AS3
            lotho Level 1
            I would definitely like to know the answer to this as well. The webservice integration is pretty much one of the key fundamentals of why flash is excellent for RIA's so I can't imagine that those classes would be phased out. It's my guess at this point that the classes haven't been converted yet for whatever reason and that they will appear in a service update.

            However, stranger things have happened...
            • 3. Webservices with Flash CS3 / AS3
              Ariston Darmayuda Level 1
              Arrrggghhhhh............... How now I connect into webservice in AS3....?????
              • 4. Re: Webservices with Flash CS3 / AS3
                Ariston Darmayuda Level 1
                Arrrggghhhhh............... How now I connect into webservice in AS3....?????
                • 5. Re: Webservices with Flash CS3 / AS3
                  PVMJR Level 1
                  I have the same exact problem - ported my entire application to AS3 this week - just getting to the web service part and no luck . I can not believe they removed the WebService functionality in an update - a nice upgrade btw - but this makes me very unhappy - I think I may have to port my web service to a servlet but is pretty darn stupid. The WebService component is available in the Flex 2 SDK in rpc.swc. I've imported that in the C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Components directory and can then see the web service component again. I also copied the framework.swc into the same directory but now I find that you can't use flex components in flash. Am I going down the wrong path here or am I on the right track.

                  Adobe, please help us out here - its very serious as I'm under major deadline
                  • 6. Re: Webservices with Flash CS3 / AS3
                    marcusw1234 Level 1
                    Quick update as to what I did.... I basically created my own SoapService class, which creates and posts the soap request then handles the response.

                    Turns out that not using Adobe's webservice classes is the best thing that could have happened.... my app size has dropped by about 30k (since my service class is only about 200 lines long, as opposed to 10000+). And my application is much more responsive in processing the soap packets.

                    The only thing it doesn't do is serialize/deserialize the soap request from objects using a WSDL, but I find it is just as easy to use native XML in AS3 for data storage instead of data objects, then just insert the XML into my soap requests.
                    • 7. Re: Webservices with Flash CS3 / AS3
                      kissmyAS3 Level 1
                      Marcus,

                      Your post has given me hope and maybe I should not abandon Flash just yet.

                      Can you elaborate on your solution? I've ran into the exact same problem with no resolve. I'm trying to communicate with my ASP.NET web services written in C# through AS3 using the following:
                      flash.net.URLLoader;
                      flash.net.URLRequest;
                      flash.net.URLRequestHeader;
                      flash.net.URLRequestMethod;
                      flash.net.URLVariables;

                      Flash won't even acknowledge my .asmx page!