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

Descargar
Página de 184
144
Data Services
MXML tag:
<mx:WebService id="MyService" wsdl="http://myServer.com/services/my.wsdl" 
useProxy="true"/>
services-config.xml file:
<destination id="defaultHTTP">
<properties>
<wsdl>{context.root}/services/ContactManagerWS?wsdl</wsdl>
<soap>{context.root}/services/ContactManagerWS</soap>
</properties>
<adapter ref="soap-proxy"/>
</destination>
Named WebService
This section describes how to migration your named WebService tags from Flex 1.5 to Flex 2.
Flex 1.5 syntax
In Flex 1.5, you referred to a named WebService with the 
serviceName
 attribute of the 
<mx:WebService>
 tag. In the configuration file, you defined a service’s WSDL and endpoint 
as entries in the whitelist.
MXML tag:
<mx:WebService id="employeeWS" serviceName="SalaryWS">
<mx:operation name="getList"/>
</mx:WebService>
flex-config.xml file:
<web-service-proxy>
<whitelist>
<named>
<service name="SalaryWS">
<wsdl>{context.root}/services/SalaryWS.wsdl</wsdl>
<endpoints>
<endpoint>{context.root}/services/SalaryWS</endpoint>
</endpoints>
</service>
</whitelist>
</web-service-proxy>