If you are writing a JavaScript application for a Node.js client, then you must specify the host name and port that are used to call the integration service.
IBMIntegration.service_name.IBMContext.hostname = "host_name";
IBMIntegration.service_name.IBMContext.port = port;
where: The lines of code are required only when the JavaScript application is run in a Node.js client. If the lines of code are included in an application that is run in a web browser, the code is ignored.
The following example shows a JavaScript application where the host name and port for an integration service named OperationsService are specified before the integration service is called:
IBMIntegration.OperationsService.IBMContext.hostname = "myhost.company.com";
IBMIntegration.OperationsService.IBMContext.port = 7800;
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);
});