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:
- In the IBM Integration Toolkit, open
your integration service in the integration service editor by double-clicking Integration
Service Description in the Application Development view.
- Click the Service tab. The integration service description
is displayed, which includes the SOAP/HTTP binding.
- Above the SOAP/HTTP binding, right-click the integration service name and click . The JavaScript client API for the integration service is generated
and a reference to the JavaScript client
API is displayed below the SOAP/HTTP binding.
The properties of
the JavaScript client
API are shown in the Properties view
when the JavaScript client
API is selected in the integration service editor.
You can view and edit the JavaScript client
API properties from the Properties view.
Note: The menu option
is not available when the JavaScript client
API already exists. In normal conditions,
you should not need to regenerate the JavaScript client API. When you add new
operations to the integration service,
or update or delete existing operations,
the API is automatically updated when you save the
integration service. However, if you want to manually
regenerate the JavaScript client
API, you must remove the existing API
first by right-clicking the JavaScript
Client API entry and clicking
Remove.
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.