Setting the Add Web Service dialog box options

The purpose of the Add Web Service dialog box is to specify the URL of a SOAP-compliant web service for use in an MXML file. Flex applications can also access web services as named services. A named service is defined in the flex-config.xml file in the application root folder on the Flex server (WEB-INF/flex/flex-config.xml). For more information, see "Declaring a data service" in Developing Flex Applications Help.

For security reasons, the flex-config.xml file prevents you from accessing unnamed web services by default. For more information, see "Configuring access to services" in Developing Flex Applications Help.

To set the dialog box options:

  1. If you don't want to use a named web service, enter the URL of the service's WSDL file in the text box.

    The following sample URLs include references to a fictional WSDL file, one dynamically generated by a .NET server, and one dynamically generated by the Java-based Apache Axis web service engine:

    http://mysite.com/services/MyWebService.wsdl

    http://mysite.com/services/MyWebService.asmx?wsdl

    http://mysite.com/services/MyWebService?wsdl

    The value is assigned to the wsdl property of the <mx:WebService> tag.

  2. If you want to use a named web service, select the named service from the pop-up menu.

    The value is assigned to the serviceName property of the <mx:WebService> tag.

    Note: The pop-up menu will list the named services only if you specified the correct application root folder when defining the site in Flex Builder. For more information, see Identifying a Flex application root folder.

  3. If you want to browse for other web services, click the UDDI Browser button (the globe icon) and select a UDDI directory.

    Flex Builder opens the directory in a browser. Copy the URL of the WSDL file you want and paste it in the Add Web Services dialog box in Flex Builder.

  4. To edit the list of UDDI directories, select Edit UDDI Site List after clicking the UDDI browser button.

    The UDDI Sites dialog box lets you add, edit, or remove UDDI directories. For more information, click the Help button on the UDDI Sites dialog box.

After you click OK, Flex Builder adds the web service to the Data panel indicating that a reference to the service has been inserted in the MXML file.

Related topics