Creating an ASE Web Service Consumer

In the Database Explorer view, you can map a Web service definition to one or more proxy tables in an Adaptive Server Enterprise database, then use the proxy tables to define queries and SELECT statements. You can also use proxy tables that have already been defined in the database.

This feature uses the Web Services Consumer component in Adaptive Server 12.5.x and later.

Prior to the steps below, you must complete the steps in Enabling the ASE Web Service Consumer.

The Web Services as Tables folder at the top level of an Adaptive Server Enterprise connection profile in the Database Explorer view displays all proxy tables that have been mapped from Web service definitions in the current database. From the pop-up menu, you can map a new Web service to one or more proxy tables and refresh the view of proxy tables in the database.

To create a new Web service proxy table:

  1. Select Map Web Service to Tables from the pop-up menu for the Web Services As Tables folder in an Adaptive Server Enterprise connection in the Objects view.

    The Select WSDL dialog helps you find a WSDL from which to create the proxy table.

  2. In the dialog, you can enter or browse for the name or the URL of a WSDL file, or you can search for a Web service using UDDI registries.

    Note

    To enter and use a local WSDL file, EAServer must also be local.

    When you complete the wizard, the Web Services Consumer maps the Web methods in the WSDL file to tables. Each proxy table contains a Columns folder, which in turn contains column objects that represent the input and output parameters of the Web service method that corresponds to the proxy table. The new proxy tables display in the Web Services as Tables folder in the Database Explorer view, and in the Select Tables dialog box in the SQL Query Editor and Visual SQL.

There are some restrictions on the use of proxy tables in defining queries and SQL statements. For a complete description of the restrictions that apply to the use of proxy tables, see the Web Services User's Guide in the Adaptive Server Enterprise documentation set included with Sybase WorkSpace.

Example

  1. In the Select WSDL dialog, select From URL.

  2. Enter http://www.xmethods.net/sd/2001/TemperatureService.wsdl and click OK.

    The proxy table is added to the Web Services as Tables folder.

  3. To use the proxy table in a query:

    1. From the SQL Editor toolbar, click the Select statement toolbar button.

    2. Select "getTemp" from the Select Tables dialog.

    3. Select "Return" in the table displayed in the Table Layout view.

    4. In the Where view, define a condition with "_zipcode" on the left side (Column) and enter a value such as 80303 on the right side (value).

    5. Click the Execute toolbar button to execute the query.

Enabling the ASE Web Service Consumer

See the Web Services User's Guide, Part 2, "Configuration" in the Adaptive Server Enterprise collection under Sybase WorkSpace Server Administration.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com