I have found the solution for this problem. I am able to establish TLS connection with IBM MQ using my GatewayScript with following steps:
- Create IBM MQ v9+ queue manager object in Datapower UI. This requires IBM MQ queue manager name, host name and channel name configuration.
- Configure TLS client profile in IBM MQ v9+ queue manager object with correct cipher matching with the cipher configured in IBM MQ channel.
- Configure certificate required to validate the server (IBM MQ) certificate in TLS client profile.
- Use URL idgmq://<IBM MQ v9+ queue manager object name>?RequestQueue=<IBM MQ Queue name> in GatewayScript to post messages to IBM MQ.
- Replace RequestQueue with ReplyQueue in the URL to pull messages from the queue.