IBM Integration Bus, Version 10.0.0.1 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Configuring a client node to dynamically call a port

Configure a client node to dynamically use a port and hostname that are set in the local environment, by the use of a message flow with MQInput, Compute, and TCPIPClientOutput nodes.

About this task

Scenario: A client node dynamically calls a port.

Instructions: The following steps show how to override the connection details specified on a client output node to dynamically use a port and hostname that are set in the local environment:

Procedure

  1. Create a message flow called TCPIP_Task16 with an MQInput node, a Compute node, and a TCPIPClientOutput node. For more information, see Creating a message flow.
  2. Connect the Out terminal of the MQInput node to the In terminal of the Compute node.
  3. Connect the Out terminal of the Compute node to the In terminal of the TCPIPClientOutput node.
    Message flow consisting of MQInput, Compute, and TCPIPClientOutput nodes.
  4. On the MQInput node, set the Queue name property (on the Basic tab) to TCPIP.TASK16.IN1 .
  5. On the Compute node, set the ESQL property (on the Basic tab) to:
    BROKER SCHEMA Tasks
    CREATE COMPUTE MODULE TCPIP_Task16_Compute
    	CREATE FUNCTION Main() RETURNS BOOLEAN
    	BEGIN
    		-- CALL CopyMessageHeaders();
    		CALL CopyEntireMessage();
    		set InputLocalEnvironment.Destination.TCPIP.Output.Hostname = 'localhost';
    		set InputLocalEnvironment.Destination.TCPIP.Output.Port = 14156;
    		RETURN TRUE;
    	END;
    
    	CREATE PROCEDURE CopyMessageHeaders() BEGIN
    		DECLARE I INTEGER 1;
    		DECLARE J INTEGER;
    		SET J = CARDINALITY(InputRoot.*[]);
    		WHILE I < J DO
    			SET OutputRoot.*[I] = InputRoot.*[I];
    			SET I = I + 1;
    		END WHILE;
    	END;
    
    	CREATE PROCEDURE CopyEntireMessage() BEGIN
    		SET OutputRoot = InputRoot;
    	END;
    END MODULE;
  6. On the TCPIPClientOutput node, set the Connection details property (on the Basic tab) to 9999.
  7. Save the message flow.

ac67560_.htm | Last updated 2015-05-28 20:50:27