Creating a Web Service Class

In the Class Browser of your schema, create the ErewhonInvestmentsService class as a subclass of the JadeWebServiceProvider class. (For details, see "Defining Your Own Classes", in Chapter 3 of the JADE Development Environment User’s Guide.)

To create a Web service provider class

  1. Click the tab of the Web Services sheet that is then displayed in the Define Class dialog.

  2. On the Web Services sheet, shown in the following image, select the Secure or Not Secure option button in the Secure Service group box to meet your requirements if you do not want your class to use the default security value defined for the application.

  3. In this release, only Secure Sockets Layer (SSL) security is provided; that is, the HyperText Transfer Protocol secure (HTTPS) protocol.

    Select the Secure option button if you want to use the HTTPS protocol or the Not Secure option button if you want to use the HyperText Transfer Protocol (HTTP) protocol.

    The default value of Default uses the secure setting defined in the application options. (For details, see "Defining a Web Services Provider Application", later in this chapter.)

    The TCP protocol for direct Web services communication, which is not secure, works only between JADE systems.

  4. If you are setting up SOAP headers, you can specify the direction of SOAP headers in the Soap Header Direction group box. This group box is enabled when you are creating or updating a SOAP header class. For details, see "Creating a SOAP Header Class", in the following section.

    By default, the Input option button is selected; that is, the direction is from the Web service consumer to the Web service provider. Select the Output option button if you want the SOAP header direction from the Web service provider to the Web service consumer or select the I-O option button if you want the SOAP header direction from the Web service consumer to the Web service provider and the reverse.

  5. If you are adding a subclass to the JadeWebServiceProvider class, check the Must Understand check box if you want the SOAP header to be mandatory for the Web service consumer recipients to process. By default, this check box is unchecked; that is, the SOAP header is optional.

    When the SOAP header is mandatory, the consumer of the header entry must obey the semantics conveyed by the fully qualified name of the SOAP header and process correctly to those semantics, or it must fail processing the message. As SOAP headers that must be understood can modify the semantics of their parent or peer headers, the semantics cannot be ignored by those who cannot fully understand them.

  6. If you are adding a subclass to the JadeWebServiceProvider class, you can specify the recipient (consumer) of the SOAP header in the Actor text box.

    Use this when you do not intend all parts of a SOAP message to be sent to the ultimate destination of the SOAP message but for one or more intermediaries on the message path. Only the consumer of a SOAP header can receive the SOAP header; that is, a consumer of a SOAP header cannot forward the header to the next application in the SOAP message path. The consumer can insert a similar header, which can be provided to another consumer of the SOAP header.

    The value of the SOAP header actor is a Uniform Resource Identifier (URI).

    The special URI http://schemas.xmlsoap.org/soap/actor/next indicates that the SOAP header is intended for the first SOAP application to process the message. If you do not specify an actor of the SOAP header, the recipient (consumer) of the Web service provider is the ultimate destination of the SOAP message.

  7. If you are adding a subclass to the JadeWebServiceConsumer class and you want to change the end-point Uniform Resource Locator (URL) in the WSDL, specify the URL of the consumer in the Service Consumer - Endpoint URL text box.

  8. If you do not want to specify any other class options, click the OK button. Alternatively, click the Cancel button to abandon your selections.

The following image shows an example of the Class List of the Class Browser in which the ErewhonInvestmentsService class has been created as a subclass of JadeWebServiceProvider.