User Guide

866 Chapter 6: Components Dictionary
WSDLURL (String type) is the URL of the WSDL file that defines the web service operation.
When you set this URL during authoring, the WSDL file is immediately fetched and parsed. The
resulting parameters and results information can be seen in the Schema tab of the Component
inspector. The service description is also added to the Web Service panel. For example, see
www.flash-mx.com/mm/tips/tips.cfc?wsdl.
Common workflow for the WebServiceConnector component
The following procedure shows the typical workflow for the WebServiceConnector component.
To use a WebServiceConnector component:
1.
Use the Web Services panel to enter the URL for a web service WSDL file.
2.
Add a call to a method of the web service by selecting the method, right-clicking (Windows)
or Control-clicking (Macintosh), and selecting Add Method Call from the context menu.
This creates a WebServiceConnector component instance in your application. The schema for
the component can then be found on the Schema tab of the Component inspector. You are
free to edit this schema as needed—for example, to provide additional formatting or validation
settings.
Note: The schema for the params and results component properties is updated each time you
change the
WSDLURL or operation parameter. This overwrites any settings that you have edited.
3.
Use the Bindings tab in the Component inspector to bind the web service parameters and results
that are now defined in your schema to UI components in your application.
4.
Add a trigger to initiate the data binding operation in one of the following ways:
Attach the Trigger Data Source behavior to a button.
Add your own ActionScript to call the trigger() method on the WebServiceConnector
component.
Create a binding between a web service parameter and a UI control, and set its Kind
property to AutoTrigger. For more information, see “Schema kinds” in Using Flash.
For a step-by-step example that connects and displays a web service using the
WebServiceConnector component, see “Web Service Tutorial: Macromedia Tips”.
WebServiceConnector class (Flash Professional only)
Inheritance RPC > WebServiceConnector
ActionScript Class Name mx.data.components.WebServiceConnector
This class allows you to connect to remote web services using ActionScript code instead of
component instances on the Stage. To use the WebServiceConnector class, you need to add an
instance of the WebServiceConnector component to your library. The component does not need
to be placed directly on the Stage. You must import the ActionScript class
mx.data.components.WebServiceConnector at the beginning of the script or use the fully
qualified class name throughout your code.