Web services are a popular standard for client-server data communication. However, Flash Player has no built-in classes specifically designed for working with Web services. If you are using the Flex framework, you can employ the mx.rpc.soap.WebService class. In this book, we're concerned primarily with solutions that rely exclusively on the Flash Player API. For a description of the WebService class, see the Flex documentation. If you are interested in a Web services solution that does not rely on the Flex framework, you have two options:
Note Another option is to manually create and parse SOAP requests and responses. This is advisable for only very simple cases. You can see an example of this in Chapter 15. The second option is often the best. One obvious reason that server-side Web service proxies are a good idea is that server-side languages generally have robust Web service capabilities that can work with a variety of protocolsnot just SOAP. Server-side scripts can also generally parse Web service responses more quickly. They can relay the responses back to the client in a format that is more compact than SOAP (to limit the bandwidth overhead), and the server can even cache responses when applicable to limit the number of Web service requests. |