The WebOperation class

The com.WebOperation class provides an interface to create and manage the operations of a Genero Web Service.

Important: This Web Services class is not supported on GMI mobile devices.

The Web Operation can be created as RPC Style or Document Style. Both RPC/Literal and Doc/Literal Styles are WS-I compliant (standards set by the Web Services Interoperability organization).

RPC Style Service (RPC/Literal) is generally used to execute a function, such as a service that returns a stock option. Document Style Service (Doc/Literal) is generally used for more sophisticated operations that exchange complex data structures, such as a service that sends an invoice to an application, or exchanges a Word document; this is the MS.Net default. The input or output RECORD cannot have XMLNamespace attributes set on their members.

Calling the appropriate function to create the desired style is the only difference in your Genero code that creates the service. The remainder of the code that describes the service is the same, regardless of whether you want to create an RPC or Document style of service.

Do not use the setInputEncoded() and setOutputEncoded() methods, as they will specify the RPC/Encoded Style, which is not recommended (see Choosing a Web Service Style).

Since release 2.0 GWS allows you to create RPC Style and Document Style operations in the same Web Service. However, we do not recommend this, as it is not WS-I compliant.