MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual do Utilizador Página 142

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 184
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 141
142 Data Services
Named HTTPService
This section describes how to migrate named HTTPService tags from Flex 1.5 to Flex 2
syntax.
Flex 1.5 syntax
In Flex 1.5, a named HTTPService was defined as a named whitelist entry in the <http-
service-proxy>
section. You used the serviceName attribute of the HTTPService tag to
identify it.
MXML tag:
<mx:HTTPService id="MyService" serviceName="Salary" protocol="https"/>
flex-config.xml file:
<http-service-proxy>
<whitelist>
<named>
<service name="Salary">
<url>https://www.myServer.com/services/salary.jsp</url>
</service>
</named>
</whitelist>
</http-service-proxy>
Flex 2 syntax
In Flex 2, you use the destination attribute of the HTTPService tag to identify the named
service in your MXML files. You also must set the value of the
useProxy property to true.
Flex 2 does not support the
protocol property; the channel defines the protocol.
MXML tag:
<mx:HTTPService id="employeeHTTP" destination="Salary" useProxy="true"/>
proxy-config.xml file:
<proxy-service>
<destination id="Salary">
<properties>
<url>https://www.myServer.com/services/salary.jsp</url>
</properties>
</destination>
</proxy-service>
Vista de página 141
1 2 ... 137 138 139 140 141 142 143 144 145 146 147 ... 183 184

Comentários a estes Manuais

Sem comentários