Providing a Web Service

Overview

In the INUBIT software, a Web service provider is modeled by using a Web Services Input Listener Connector in a Technical Workflow. The Web Services Input Listener Connector offers the functionality of an underlying Technical Workflow externally as a Web service.

The following example illustrates the essential modules for a Web service provider (from left to right):

module guide 1187 0
  1. Web Services Listener Connector ProvideWebService

    The Web Services Input Listener Connector provides amongst others the operation SayHello and waits for SOAP requests from other Web services.

    As soon as a SOAP request arrives, it is passed on to the following module, the Demultiplexer, and the workflow is started.

  2. Demultiplexer Demux (optional)

    With one SOAP request, exactly one operation of a Web service can be called, although the Web service offers several operations.

    You use a Demultiplexer to specify on basis of the XML element contained in the request which operation is to be executed.

    The Demultiplexer passes on the request into the appropriate branch of the workflow where the request is processed further. In the example above, the Empty modules DoSomething and DoSomethingElse are dummy modules representing additional processing modules.

  3. XSLT Converter CreateResponse

    The processing result, the SOAP response, is passed on by the last module in the Technical Workflow in a Web service-compliant form to the requesting Web service. This SOAP response is generated by using an XSLT Converter.

Configure a Web Services Input Listener Connector

Proceed as follows

  1. Create a Technical Workflow.

  2. Add a Web Services Input Listener Connector. During properties configuration, specify that the definition of the called Web service is stored with the module.

  3. Refer to Dialog Provided Web Service

    Open the context menu of the connector and select Edit to display the Web Service Editor.

  4. Click Add Operation. The following dialog opens:

    module guide 1188 0
  5. Assign a name to the operation, e.g. SayHello.

  6. In the Style field, select Request/Response. This specifies that your Web service returns a SOAP response to the requesting Web service, instead of only processing the request.

  7. Click OK to close the dialog.

    After closing the dialog, your specifications are converted into the WSDL of your Web service which defines e.g. the structures of the SOAP Request and Response.

    You can display the WSDL in the WSDL editor tab and the SOAP Requests/Responses in the SOAP messages tab.

  8. Publish the connector.

Create SOAP Response

Proceed as follows

  1. Create an XSLT Converter, add it to the Technical Workflow and connect it to the Web Services Input Listener Connector.

  2. Open the XSLT Converter for editing.

    The result of the workflow execution must be structured in a WSDL-compliant form as a SOAP Response before it can be passed back to the requesting Web service.

  3. In this example, no processing took place, therefore you only create an output mapping. To do this, click module guide 1189 0 in the XML target file area and select Open from > Web Services Explorer. A dialog opens.

  4. In the Module field, select your Web Services Input Listener and in the Operation field, select SayHello [Response]:

    module guide 1189 1
  5. Click Finish. The structure of the SOAP message is displayed.

  6. Drag the root element of the generated SOAP message in the upper XML target area on to the xsl:template element and adapt the value of the `sayHelloResponse `element:

    module guide 1190 0
  7. Publish the XSLT Converter.

  8. Testing

    Create a second Web service that calls your just newly created Web service.

  9. Publish the Technical Workflow.

You can make the created Web service available to other users by means of a UDDI registry.