Defining outbound chains for WebSphere MQ interoperation

You can define new outbound chains by using the wsadmin utility. These chains can be used for interoperating with WebSphere® MQ.

About this task

The channels used to build an outbound chain determine with which configurations of the WebSphere MQ queue manager sender channel so a network connection can be successfully established. The following table shows all the valid chain configurations and describes the configuration of aWebSphere MQ queue manager sender channel with which they can be used to establish a connection.
Table 1. Valid chain and WebSphere MQ queue manager sender channel configurations. The first column of the table provides the WebSphere MQ channels. The second to fourth columns in the table indicate whether the TCP, SSL, and MQFAP channels in combination with the WebSphere MQ channel can establish a network connection successfully. It is important to follow a specific order of the channels while building the chain. The order of the channels from left to right as given in the table is TCP, SSL, and MQFAP channels.
channel Unsecured channel channel secured by using SSL
TCP channel X X
SSL channel   X
MQFAP channel X X

For example, an SSL-based chain would consist of a TCP channel, SSL channel and MQFAP channel. When creating chains, the order of channels in the chain is important. You must specify channels in the order (left to right) in which they appear in the above table.

The example in this topic describes how to create an outbound chain capable of being used to contact WebSphere MQ queue manager receiver channels by using SSL-based encryption.

[IBM i] Note: You open a wsadmin command session from within Qshell. For more information, see the topic "Configure Qshell to run WebSphere Application Server scripts".

Procedure

  1. Locate the TransportChannelService object for the server in which you want to create the new chain. For example, in a WebSphere Application Server Network Deployment configuration, you can list the available TransportChannelService objects and select the appropriate service.
    Using Jython:
    wsadmin>AdminConfig.list("TransportChannelService" )
    (cells/BadgerCell01/nodes/BadgerCellManager01/servers/dmgr|server.xml
    #TransportChannelService_1)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/nodeagent|server.xml
    #TransportChannelService_1095
    711814579)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml
    #TransportChannelService_109571
    2023139)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/server2|server.xml
    #TransportChannelService_109571
    2039302)
    wsadmin>tcs = AdminConfig.list("TransportChannelService" ).split("\r\n")[2]
    Using Jacl:
    wsadmin> $AdminConfig list TransportChannelService
    (cells/BadgerCell01/nodes/BadgerCellManager01/servers/dmgr|server.xml
    #TransportChannelService_1)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/nodeagent|server.xml
    #TransportChannelService_1095711
    814579)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml
    #TransportChannelService_109571202
    3139)
    (cells/BadgerCell01/nodes/BadgerNode01/servers/server2|server.xml
    #TransportChannelService_109571203
    9302)
    wsadmin> set tcs [lindex [$AdminConfig list TransportChannelService] 2]
    (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml
    #TransportChannelService_109571202
    3139)
  2. Define an outbound TCP channel called testTCPChannel.
    Using Jython:
    wsadmin>tcpChannel = AdminConfig.create("TCPOutboundChannel", tcs, 
    [["name", "testTCPChannel"]] )
    Using Jacl:
    wsadmin>set tcpChannel [$AdminConfig create TCPOutboundChannel $tcs 
    "{name testTCPChannel}"]
    testTCPChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#
    TCPOutboundChannel_1095969213949)
  3. Define an outbound SSL channel called testSSLChannel. There are two steps required to define such a channel.
    1. Identify the SSL alias to be used by the channel.
      Using Jython:
      wsadmin>for obj in AdminConfig.list("SSLConfig" ).split("\r\n"): 
      print obj+AdminConfig.show(obj, "alias")
      Using Jacl:
      wsadmin>foreach obj [$AdminConfig list SSLConfig] { puts "$obj 
      [$AdminConfig show $obj alias]]" }
      (cells/BadgerCell01|security.xml#SSLConfig_1) {alias BadgerCellManager01/
      DefaultSSLSettings}]
      (cells/BadgerCell01|security.xml#SSLConfig_1095711819776) {alias BadgerNode01/
      DefaultSSLSettings}]
    2. Create an SSL channel as in the following example, in which the BadgerNode01/DefaultSSLSettings alias is used.
      Using Jython:
      wsadmin>sslChannel = AdminConfig.create("SSLOutboundChannel", tcs, [["name", 
      "testSSLChannel"], ["sslConfigAlias","BadgerNode01/DefaultSSLSettings"]])
      Using Jacl:
      wsadmin>set sslChannel [$AdminConfig create SSLOutboundChannel $tcs 
      "{name testSSLChannel} 
      {sslConfigAlias BadgerNode01/DefaultSSLSettings}"]
      testSSLChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#
      SSLOutboundChannel_1095971760671)
  4. Define an outbound MQFAP channel called testMQFAPChannel.
    Using Jython:
    wsadmin>mqfapChannel = AdminConfig.create("MQFAPOutboundChannel", tcs, 
    [["name", "testMQFAPChannel"]] )
    Using Jacl:
    wsadmin>set mqfapChannel [$AdminConfig create MQFAPOutboundChannel $tcs 
    "{name testMQFAPChannel}"]
    testMQFAPChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#
    MQFAPOutboundChannel_1095977512682)
  5. Finally, create the channel chain by combining the channels defined so far. For example, to create a chain called testChain:
    Using Jython:
    wsadmin>AdminConfig.create("Chain", tcs, [["name", "testChain"], ["enable", 
    "true"], ["transportChannels", [tcpChannel, sslChannel, mqfapChannel]]] )
    Using Jacl:
    wsadmin>$AdminConfig create Chain $tcs "{name testChain} {enable true} 
    {transportChannels {$tcpChannel $sslChannel $mqfapChannel}}"
    testChain(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#Chain_109
    5977640896)
Task topic    

Terms and conditions for information centers | Feedback

Last updated: April 17, 2014 10:32 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-express-iseries&topic=tjk2000_
File name: tjk2000_.html