3.2. Web Service Proxy

The Flex WebService component facilitates the interaction of a Flex client with a SOAP-based web service. Using this component, a Flex client can invoke remote operations on a web service and access data using such a service. Like HTTPService, the WebService component can access the services directly as long as these services are served from trusted domains. The domain from which the Flex client was served and those that define a security policy in a crossdomain.xml file are trusted domains as far as the Flex client is concerned. Read the note on crossdomain.xml at the beginning of this chapter if you need to review its features.

A SOAP web service publishes its available operations, the parameters it takes, the message type it returns, and the encoding it embodies in an XML-based format file, commonly called the WSDL. WSDL, which stands for Web Services Description Language, has become an acronym for the file itself as well as representing the format and the protocol. WSDL can be stored locally in the file system or be available as a web resource over a URI.

A web service component first expects to read and parse a WSDL for a service. If it successfully parses this, it calls the exposed operations. It can bind parameters to these operations and can receive responses, which it can subsequently consume.

Web service calls can be directed via a web service proxy on the server. This helps access SOAP-complaint services from domains that may not be explicitly ...

Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.