If you are writing a JavaScript application for a web browser client, then you must reference the dojo.js module and the JavaScript client API file that are used to call the integration service.
<script type="text/javascript" src="/context_root/namespace/service_name?resource=dojo.js"></script>
<script type="text/javascript" src="/context_root/namespace/service_name?resource=service_name.js"></script>
where: The lines of code are required only when the JavaScript application is run in a web browser client. If the lines of code are included in a Node.js application, the code is ignored.
The following example shows a JavaScript application where the dojo.js module and the JavaScript client API file for an integration service named OperationsService are specified before the integration service is called:
<script type="text/javascript" src="/OperationsService/OperationsService?resource=dojo.js"></script>
<script type="text/javascript" src="/OperationsService/OperationsService?resource=OperationsService.js"></script>
var multiInputVar =
{
"input1" : "input1Value" ,
"input2" : "input2Value"
};
IBMIntegration.OperationsService.multiInput( multiInputVar, function(errorObj, responseObj))
{
console.log("IBMIntegration.OperationsService.multiInput()");
console.log("Response "+JSON.stringify(responseObj));
console.log("Response="+responseObj.output1);
});