- This line was added.
- This line was removed.
- Formatting was changed.
Jitterbit enables integrations to be exposed and called through Hosted Web Services. To host a web service on Jitterbit, you need to create a Hosted Web Service operation which establishes a URL and Port on which the web service will listen to requests. A Hosted Web Service can consist of one Hosted Web Service operation that comprises two transformations: the first processes the request, and the second processes the response.
NOTE: Hosted Web Service may be implemented only on Private Agents. If you are running on Cloud Agents, you need to use the Custom API feature to call an operation. To configure a Custom API, refer to API Manager for additional information.
If you need to run multiple operations to process a web service request, do not create any transformations in the Hosted Web Service. Create one only to establish the URL and Port and to trigger other operations that use the Hosted Web Service Request in their transformations to process the requests against multiple systems. If multiple operations are to be triggered, the response transformation should be placed in the first triggered operation that is called synchronously when the web service request is made.
All subsequent operations are triggered asynchronously. For example, if you wish to perform multiple actions with an Order Request: Create an Archive File with the request, transform the request into your ERP system, and then call another Web Service to fulfill the order you would trigger other operations from the Hosted Web Service operation.
the Web Service Method
Before you create a Hosted Web Service, you will need a valid WSDL file that represents the methods with request and response schemas for the web services you need to host on Jitterbit. To create a Hosted Web Service, you first need to define a web service method as described in Creating in Creating a Web Service Method.
Specifying Credentials for Your Web Service
You can enable standard web service authentication for your web service on the Web Service Method screen. Alternatively, you can configure the Jitterbit Private Agent's Apache Server to handle certificates.
Creating a Hosted Web Service
The difference between creating a Hosted Web Service and a web service call is the types of transformations used. For a web service call, one or more transformations are used to transform the data from the web service request. However, only one transformation can be used to transform the return values as the response to the request, and that transformation must either be placed in the Hosted Web Service Operation or in the first triggered Operation from the Hosted Web Service.
Creating the Transformations
You can choose how many transformations you want to use to fulfill the requirements of the Hosted Web Service:
- The simplest implementation has just one transformation from a web service request to a web service response. This transformation can use script functions (e.g., DBLookup(), LdapSearch()) to return data based on the input parameters of the web service.
- You can also have two transformations. The first one must take a web service request as source, and the last one must have a web service response as target.
- If you need to perform multiple operations with the Hosted Web Service Request, all triggered operations must also use the same source structure in their transformations. To process the Hosted Web Service Response, the second transformation of a Hosted Web Service operation must have a target structure derived from the Hosted Web Service Response using the Web Service Method for that Hosted Web Service. If you trigger other operations, then the first triggered operation must include a transformation that includes the response.
Setting up a Hosted Web Service in an Operation
- Choose Hosted Web Service from the Activity dropdown list.
- Select a predefined Web Service from the Web Service dropdown menu, or click the control button to the right of the field to create a new Web Service.
- Select a predefined request transformation (which transforms data from the web service request) from the First Transformation dropdown menu, or click the control button to the right of the field to create a new request transformation.
URL for the Hosted Web Service
- Right-click on the icon for the operation that implements the hosted web service.
- Select the option View Hosted Web Service URL.
- In the Server: box, type in the external name or IP address of your Jitterbit server. If Jitterbit runs on a non-standard port, you must also change the port.
- The URL for the hosted web service automatically appears in the URL field.
- Click Copy To Clipboard or select and Copy the URL from the URL field.