MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guia do Utilizador Página 211

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 256
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 210
Insert a WebService component 211
The wsdl property specifies the location of the WSDL file for the web service. As of this
writing, the location was still valid, but you should check to make sure it hasnt changed.
You can find the latest WSDL file location on the developers page at www.adobe.com/go/
mxna_developers, under Web Services.
The
useProxy property specifies that you dont want to use a proxy on a server. For more
information, see “Review your access to remote data sources” on page 206.
2. Specify the parameters to pass to the web service method.
According to the API documentation, the
getMostPopularPosts method takes the
following required parameters:
daysBack specifies the number of days you want to go back.
limit specifies the total number of rows you want returned.
To specify these parameters, enter the following tags between the opening and closing
<mx:WebService> tags:
<mx:operation name="getMostPopularPosts">
<mx:request>
<daysBack>30</daysBack>
<limit>{cbxNumPosts.value}</limit>
</mx:request>
</mx:operation>
The name property of an <mx:operation> tag must match the web service method name.
You use a constant for the value of the
daysBack parameter, but you bind the value of the
limit parameter to the value of the selected item in the cbxNumPosts ComboBox
control. You want the user to specify the number of posts to list.
The next step is to prompt the application to call the web service method. You decide the
method should be called when the ComboBox control changes in response to the user
selecting an option.
3. In the <mx:ComboBox> tag, add the following change property (in bold):
<mx:ComboBox x="30" y="25" id="cbxNumPosts"
change="wsBlogAggr.getMostPopularPosts.send()">
NOTE
If you want, you can also use the following alias in the component: http://
www.adobe.com/go/flex_mxna_wsdl.
Vista de página 210
1 2 ... 206 207 208 209 210 211 212 213 214 215 216 ... 255 256

Comentários a estes Manuais

Sem comentários