Web service example 1: Define a web service provider

Previous Next

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

To define the web service provider:

In the Web Services (Provider) window, define a TRAVELSERVICE web service provider.

1.On the Methods tab page, define a GETTOURS method, set the Operation Style to: RPC-oriented, and set the Method Call to: Synchronous.
2.Define SQL statement:

SELECT                *

FROM                tour

WHERE                destination = :destination

AND                tour_type = :tour_type

 

3.Click the Check button, and in the Question dialog, click Yes.
All input and output parameters are generated. Parameter names are unique (case sensitive): there can be two different destination and DESTINATION parameters. USoft determines the XML Data Type of all parameters automatically.
The order of the parameters is the order in which the bind variables appear in the SQL statement. This may not be the order in which you want to think of, or expose, the parameters in the web service. If necessary, check and re-arrange the order of parameters.
4.On the Details tab page, specify all Rules Service and Web Service Files settings. For example:
Application: TRAVEL
User: TRAVELUSER
Password: traveluser
Host Name: MyWebServer
Port Number: 7777
Access Point File: C:\inetpub\wwwroot\TravelService\TRAVELSERVICE.ashx
Access Point URL: http://MyWebServer/TravelService/TRAVELSERVICE.ashx
WSDL File: C:\inetpub\wwwroot\TravelService\TRAVELSERVICE.wsdl
WSDL URL: http://MyWebServer/TravelService/TRAVELSERVICE.wsdl
Target Namespace: http://MyWebServer/TravelService/TRAVELSERVICE.wsdl
5.Save your changes.
6.Click the Create Web Service button.
The web server publication folder now contains a TRAVELSERVICE.xml, TRAVELSERVICE.asp file, and TRAVELSERVICE.inc file.
7.Click the Create WSDL File button.
The web server publication folder now contains a "TRAVELSERVICE.ashx" file and a "web.config" file in the TRAVELSERVICEConfig folder.
8.Start a Rules Service for the TRAVEL application that is accessed by the web service provider on port 7777.

 

Continue with

Web service example 1: Define a web service component that calls the TRAVELSERVICE web service provider.