Macromedia flex 2-migrating applications to flex 2 Manual De Usuario

Descargar
Página de 184
Migrating secure data services
145
Flex 2 syntax
In Flex 2, you refer to named WebServices with the 
destination
 attribute of the 
<mx:WebService>
 tag. In the configuration file, you define the location of the WSDL file 
and the endpoint as part of the service destination.
MXML tag:
<mx:WebService id="employeeWS" destination="SalaryWS">
<mx:operation name="getList"/>
</mx:WebService>
services-config.xml file:
<proxy-service>
<destination id="SalaryWS">
<properties>
<wsdl>{context.root}/services/SalaryWS?wsdl</wsdl>
<soap>{context.root}/services/SalaryWS</soap>
</properties>
<adapter ref="soap-proxy"/>
</destination>
</proxy-service>
Migrating secure data services
This section describes the changes you must make to your destination definitions in order to 
use secured data services in your Flex applications.
Migrating services that use run-as
Third-party service endpoints may require authentication information. In Flex 1.5, you used 
the 
run-as
 element to pass credentials to remote endpoints. In Flex 2, you use r
emote-
username 
and 
remote-password
 elements to specify credentials that a remote endpoint 
requires.
The changes in this section apply to the HTTPService, WebService, and RemoteObject 
services.