How to Call an External Web Service From a Process

You can implement a call to an external web service in a business process application, and then deploy and test that application.

Note: An external web service is one that is hosted by an external application (that is, an application that is not hosted in the BPM runtime).

You should work through each section in turn to complete the tutorial.

A process (acting as a service consumer) can invoke web service operations provided by other processes or applications (service providers).

The process in this tutorial invokes a request-response operation to send a request message to a web service and receive a response message back from it.

A concrete WSDL document that defines the request-response operation is provided by the web service.

From this tutorial you will learn:

  • to use a service task to call an external web service from a business process, using a concrete WSDL provided by the web service. See "Calling a Web Service" in the TIBCO ActiveMatrix BPM Implementation Guide.
  • to import a WSDL into a project and associate it with a web service task. See "Using Web Services" in the TIBCO ActiveMatrix BPM Implementation Guide.
  • to create and install an HTTP Client resource instance from a resource template, using the Administrator interface in the BPM runtime.See "Exposing a Web Service" in the TIBCO ActiveMatrix BPM Implementation Guide.
  • to map the system participant used by a web service task to a BPM runtime HTTP Client resource instance. See "Calling a Web Service" in the TIBCO ActiveMatrix BPM Implementation Guide.

Prerequisites

You should be familiar with the basic concepts and principles involved in calling web services.

You should be familiar with the basics of designing, implementing and deploying process-based applications using TIBCO Business Studio. If you are not familiar with these things, you should run through the following tutorials before attempting this one:

  • How to Design a Simple WelcomeUsers Business Service
  • How to Implement and Deploy the WelcomeUsers Application

This tutorial implements a call to an Apache Axis2 web service called UKAddressService. Before you begin, you must deploy this web service to a J2EE server (such as Apache Tomcat) that is running version 1.4.1 of the Axis2 engine. To do this:

Procedure

  1. Find the UKAddressService.zip file in the location where you installed TIBCO Business Studio.
  2. Copy the zip file to a temporary directory and unzip it. It contains a single Axis2 web service archive, UKAddressService.aar.
  3. Deploy the UKAddressService.aar file to a J2EE server that is running the Axis2 engine, version 1.4.1.

    See http://ws.apache.org/axis2/index.html for more information about Axis2.

  4. Make sure that the UKAddressService web service has been properly deployed and is running.