O'Reilly logo

Adobe® Flex® 3 Bible by David Gassner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. Working with HTTP Service and XML

Applications built with the Flex framework are commonly both dynamic and data-centric: They use, present, and allow users to modify data that's imported at runtime from a server-based data store (or, in the case of desktop applications running on AIR, a local database).

Flash Player and the Adobe Integrated Runtime don't have the ability to communicate directly with server-based data storage applications such as database and LDAP servers. Instead, they're designed to communicate with middleware application servers using a variety of protocols.

The Flex framework includes three Remote Procedure Call (RPC) components that allow you to integrate your Flex applications with common application server products. Of these, the HTTPService component has the most flexibility in terms of the format of messages that are exchanged between the client and server at runtime. Unlike the other RPC components, you can use the HTTP Service component with any application server, because it exchanges data in the form of simple HTTP parameters and XML of any flavor.

In this chapter, I describe the use of the HTTPService component to retrieve data from a Web server at runtime. I also cover how to send data from a Flex application to a dynamic application server using HTTP requests that are similar to those that are sent from a Web browser using a hyperlink or a data entry form.

Note

To use the sample code for this chapter, import the chapter21.zip Flex project archive ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required