Exposing a Web Service
This section describes some general considerations to be aware of when exposing a web service.
It follows on from Using Web Services, which provides general information about using web services with processes.
See also the How to Expose a Web Service From a Process tutorial.
A process can expose a web service operation that other processes or applications can invoke. In this case, the process acts as the service provider in the conversation.
Service Bindings and WSDLs
A process can expose a service using the following types of binding on the service endpoint:
- a virtualization binding. A virtualization binding can only be accessed by an internal client application (one hosted in the BPM runtime). A virtualization binding is exposed whether you use an abstract WSDL or a concrete one.
- a SOAP binding. A SOAP binding can be accessed either by an external client (an application that is not hosted in the BPM runtime) or, if required, by an internal client. You must use a concrete WSDL to expose a service on a SOAP binding.
- You can use the TIBCO BPM Binding Preferences page ( ) to set the default binding preferences for a service as a process provider participant. The default is SOAP over HTTP using SOAP version 1.1.
This applies to a generated WSDL, and to an imported abstract WSDL. If you import a concrete WSDL then this will be ignored and the binding will be the one defined in the WSDL.
Service Development - Contract First or Contract Last
TIBCO Business Studio allows you to use either a contract first or contract last approach when exposing a service, depending on which suits your requirements:
- Contract first (or top-down): You first obtain the WSDL that defines the service contract from the service consumer, then configure the process to receive and return the appropriate data.
- Contract last (or bottom-up): You first define the data that the process will receive and return, then generate a WSDL that defines the service contract. The client application must then conform to that contract when it calls the service.
Application Upgrade
When a process exposes a web service operation, a WSDL defines the service interface to that operation. The WSDL can be either imported or automatically generated by TIBCO Business Studio.
Once the application containing the process has been deployed to the BPM runtime, it can only be subsequently upgraded if its service interface (defined by the WSDLs used to expose its services) has not changed. (See "Upgrading a Deployed Application" in the TIBCO ActiveMatrix BPM Deployment Guide.)
If a process uses a generated WSDL, making changes to the project may result in changes to the generated WSDL, meaning that the application cannot be upgraded. See Making Changes to the Service Interface for more information about interface changes and about best practice in making and managing them.
Exposing the Web Service operation as a REST Service
You can expose a business process as a REST service for use via the REST API. See Exposing the Web Service Operation as a REST Service for more information.