Web Service Example 1: Define a Web Service Component

Previous Next

This topic is the second part of Web Service Example 1: RPC-Oriented Method with Simple Type Parameters.

First complete Web Service Example 1: Define a Web Service Provider. This example is an add-on.

In this example, the TRAVELCOMPONENT web service component is defined in the same repository.

IMPORTANT:

Keep in mind that this is not a realistic situation: In a real-life situation, the TRAVELSERVICE provider will be called from some remote client application somewhere in the world.

To define a web service component that calls the TRAVELSERVICE web service provider:

1. In the Definer catalog, double-click Web Service Components.

The New Web Service Component Wizard appears.

2. In the WSDL File field, specify the http address of the WSDL file that you defined for the web service provider.

http://MyWebServer/TravelService/TRAVELSERVICE.wsdl

3. Click Next.

 

4. In the Web Service Methods list, select the GETTOURS method, and click Next.

 

5. Specify Web Service Name: TRAVELCOMPONENT

 

6. Click Next, and click Finish.

The web service component is created.

7. Open the application that contains the web service component, and in the SQL command dialog, issue SQL statement:

INVOKE TRAVELCOMPONENT.GETTOURS

WITH

SELECT 'AUSTRALIA','ISLAND SUNTANNER'

All details of this record (if any) are returned in plain text.

For background information about all SOAP messages sent, refer to: Web Service Example 1: SOAP request and response messages.