Generating a JavaScript client API for an integration service
An IBM® Integration Bus integration service developer or administrator can generate a JavaScript client API for an existing integration service so that the integration service can be called from an application that is running in a JavaScript environment.
Before you begin
- You must have an existing integration service that uses the default SOAP/HTTP binding.
- Ensure that you are not referring to information from SOAP headers or SOAP attachments in your integration service, because this information is not available when the integration service is called by the JavaScript client API.
- If the JavaScript client API is being generated for use by a web browser-based JavaScript application, then you must configure the IBM Integration Bus environment to support this usage, see Configuring the environment for a web browser-based application that uses the JavaScript client API.
Procedure
Complete the following steps to generate a JavaScript client API from an existing integration service:
Results
- JavaScript client API files are generated from the definition of the existing integration service interface. The JavaScript client API files contain code that includes a JavaScript method for each integration service operation.
- A JSON/HTTP binding is added to the integration service so that JSON (JavaScript Object Notation) messages that are sent from the JavaScript client API can be processed by the integration service.
- A web page that describes the JavaScript client API is generated. From the web page, the JavaScript developer can download or reference the JavaScript client API code and copy sample code directly into JavaScript applications. The web page is accessed from the integration service URL.
What to do next
- Deploy the integration service to an integration server. For more information, see Deploying integration solutions.
- Provide JavaScript developers with the integration service URL so that they can download or reference the JavaScript client API files and copy the sample code. The JavaScript developers can use the JavaScript client API to call the integration service. For more information, see Calling an integration service by using a JavaScript client API.