Accessibility

Flash Article

 

Getting a Handle on Web Services in Macromedia Flash MX Professional 2004


Vera Fleischer

Vera Fleischer

 

Table of Contents

Created:
17 February 2004
User Level:
Intermediate

So you have heard that Macromedia Flash MX Professional 2004 has built-in support for web services. Great! But is this unconditionally true? Are all web services now supported in Flash? Are there exceptions? Workarounds? What if the server on which the web service is hosted doesn't have a policy file?

I have answers for you. For two whole weeks I did nothing but scour the web for different kinds of web services to see how Flash would handle them. In this article I will discuss most of my findings. In light of the fact that there are all kinds of different web services out there, I will also do a quick comparison of the advantages of the WebServiceConnector component, the WebService classes, and Macromedia Flash Remoting. For a more detailed comparison, please refer to Choosing Between XML, Web Services, and Remoting for Rich Internet Applications by Steven Webster. Finally, I am going to walk you through the creation of a generic web service proxy in PHP to solve the cross-domain problem. This proxy will let you hook up to any SOAP web service, with or without a policy file. Let's do it!

Requirements

To complete this tutorial you will need to install the following software and files:

Macromedia Flash MX Professional 2004

For the web server proxy example:

Tutorials and sample files:

To get the most out of this tutorial, you should be familiar with the WebServiceConnector component and the WebService API in Flash MX Professional 2004. If you aren't familiar with them, please browse through the web services resource links on the Macromedia Developer Center, making sure to check out Jeffrey Hill's article, Using the Flash MX 2004 Web Service Classes, on flash-db.com. To complete the proxy server example, you should also have some experience with a server-side scripting language such as PHP or ColdFusion.

About the author

Vera Fleischer has been a slave to Flash since 2000. She first started playing with it after she accidentally opened it at a small e-learning shop in Charlottesville, Virginia. After about two years of developing educational content with Flash, she moved to San Francisco so that she could be closer to Macromedia, the home of Flash. In San Francisco, she loitered near the Macromedia building until somebody finally hired her. Vera is now a QA Engineer on the Flash team. When she is not at work, you can find Vera at www.mediasparkles.com, and she welcomes any questions you may have about this article.