MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manuel d'utilisateur Page 142

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 184
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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>
Vue de la page 141
1 2 ... 137 138 139 140 141 142 143 144 145 146 147 ... 183 184

Commentaires sur ces manuels

Pas de commentaire