Configuring the environment for a web browser-based application that uses the JavaScript client API

To ensure that a web browser-based JavaScript application can receive messages from the integration service, you must deploy the IBM App Connect Enterprise HTTP proxy servlet onto the web application server that hosts the JavaScript application.

About this task

By default, direct communication between a web browser-based JavaScript application and an integration service is blocked by the web browser to prevent a potential cross-site scripting attack. To enable communication between the JavaScript application and an integration service, you must complete the following tasks to install and configure an HTTP proxy servlet:

Procedure

  1. Configure the integration server that hosts the integration service to use the integration node listener for SOAP nodes.
  2. Start an MQ listener (for example, the SYSTEM.DEFAULT.LISTENER.TCP listener) in the IBM MQ queue manager.
    For more information, search for START LISTENER in the IBM MQ product documentation.
  3. Configure the HTTP proxy servlet with the following initialization parameters:
    Parameter name Value Description
    useClientMode true You should set this value to true even if the web application server is on the same machine as IBM App Connect Enterprise.
    useQueueManagerDataInsteadOfConfigFile qmgr qmgr is the name of your IBM MQ queue manager.
    clientModeHostname hostname hostname is the host name or IP address for the queue manager. You can set this value to localhost if IBM MQ is installed on the same machine as IBM App Connect Enterprise.
    clientModeChannelName channelname channelname is the name of the IBM MQ SVRCONN channel. The default value is SYSTEM.DEF.SVRCONN.
    clientModePortNumber portnumber portnumber is the port number of the IBM MQ listener that you started in step 2. The default value for the SYSTEM.DEFAULT.LISTENER.TCP is 1414.
  4. Deploy and configure the HTTP proxy servlet on the web application server that will host the JavaScript application.

Results

You have deployed the IBM App Connect Enterprise HTTP proxy servlet onto a web application server. A web browser-based JavaScript application (that is deployed on the same web application server as the HTTP proxy servlet) can now communicate with an integration service that is deployed on an IBM App Connect Enterprise integration server.

What to do next

Generating a JavaScript client API for an integration service