MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Uživatelský manuál Strana 143

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 184
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 142
Migrating WebService components 143
Migrating WebService components
The default value of the useProxy property is false. The WebService tags are now
configured in the
<proxy-service> section of the services-config.xml file or a file that it
includes by reference. They were previously described in the
<web-service-proxy> section
of the flex-config.xml file.
To bind service results in Flex 2, you use the
lastResult property of the service as the
binding source, as the following example shows:
<mx:Text text="{tempService.getTemp.lastResult}"/>
In Flex 1.5, the result property was the binding source.
Unnamed WebService
This section describes how to migrate unnamed WebService tags from Flex 1.5 to Flex 2.
For unnamed WebServices tags that set
useProxy="false", you are not required to make any
changes. These tags already ignore all server side configuration.
Flex 1.5 syntax
In Flex 1.5, you added an unnamed whitelist entry to the <web-service-proxy> section of
the configuration file.
MXML tag:
<mx:WebService id="MyService" wsdl="http://myServer.com/services/my.wsdl"/>
flex-config.xml file:
<web-service-proxy>
<whitelist>
<unnamed>
<url>http://myServer.com/services/*</url>
</unnamed>
</whitelist>
</web-service-proxy>
Flex 2 syntax
In Flex 2, the MXML tag syntax for an unnamed WebService is almost the same, but you
must also set the value of the
useProxy property to true. Flex 2 does not support the
protocol property that was available in Flex 1.5; the channel defines the protocol. In the
configuration file, you must specify a channel and an adapter that matches the value of the
wsdl attribute.
Zobrazit stránku 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 183 184

Komentáře k této Příručce

Žádné komentáře