The first step when providing a web service is to create its definition in the Definer.
To define a web service and its methods:
|In the Definer catalog, click Web Services (Provider).
|You can also select Web Services from the Define, Web Services Provider menu.
|The Web Services (Provider) info window appears.
|Enter a Service Name for your web service and a description (optional).
|The name of the service must be unique (case insensitive), and a web service provider cannot have the same name as an RDMI component.
|On the Methods tab page, enter a name for a method.
|The method name must be unique (case insensitive) within the web service, and must be a valid name for an XML element: it must start with a letter or underscore, and can only contain letters, digits, underscores, hyphens (-), and full stops (.).
|Choose whether you want the method call to be Synchronous or Asynchronous.
|When calling a synchronous method, the client application waits for a response from the web server. When calling an asynchronous method, the client application sends the message and does not wait for a response. The main difference is in error handling. In the case of an error, a synchronous method with no output parameters returns an error message to the client application and an asynchronous method does not.
|You are advised to use asynchronous calls only when necessary, because the client application does not receive error messages in the case of an error.
|In case of an asynchronous method, if the SQL statement has output expressions and output parameters are created, after checking the method, the service that is generated (WSDL file) has no output parameters.
|Choose an Operation Style for the method. This can be Document-oriented or RPC-oriented.
|Define a SQL Statement for the method.
Keep in mind that:
•Document-oriented methods must always receive XML values as input parameters and return XML values as output parameters.
•For RPC-oriented methods, the format of the parameters depends on the IO Format of the specified domain.
•If the IO Format is : XML, XML values must be received and returned. Otherwise, there are no restrictions.
For more information, refer to: Rules for Parameter Values.
An input parameter has Syntax
:<input parameter name>
For example, to retrieve a value for the person_name input parameter:
WHERE person_name = :person_name