
206 Use Web Services
Set up your project
Before you begin this lesson, perform the following tasks:
■ If you have not already done so, create the Lessons project in Adobe Flex Builder. For
more information, see “Create the Lessons project” on page 101.
■ Ensure that the automatic build option is enabled in Flex Builder. This option is enabled
by default in the standalone configuration of Flex Builder but not in the plug-in
configuration. To enable it, select Project > Build Automatically.
Review your access to remote data
sources
For security reasons, applications running in Flash Player on client computers can only access
remote data sources if one of the following conditions is met:
■ Your application’s compiled SWF file is in the same domain as the remote data source.
■ You use a proxy and your SWF file is on the same server as the proxy.
Adobe Flex Data Services provides a complete proxy management system for Flex
applications. You can also create a simple proxy service using a web scripting language
such as ColdFusion, JSP, PHP, or ASP. For more information on creating a proxy, see the
following TechNote on the Adobe website at www.adobe.com/go/16520#proxy.
■ A crossdomain.xml (cross-domain policy) file is installed on the web server hosting the
data source.
The crossdomain.xml file permits SWF files in other domains to access the data source.
For more information on configuring crossdomain.xml files, see the following TechNote
on the Adobe website at www.adobe.com/go/14213.
The data sources used in this lesson are located in a domain that has a crossdomain.xml setup.
Therefore, Flash Player can access the remote data.
Review the API documentation
The MXNA blog aggregator provides a number of web services for developers at
www.adobe.com/go/mxna_developers. Before you start building your application, you should
review the API documentation for their web services to make sure a method exists that can
retrieve the information you want. The API documentation for the web services is located at
www.adobe.com/go/mxna_api.
Kommentare zu diesen Handbüchern