Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IBM MQ messaging automation
#1
Solved: 8 Years, 1 Month, 1 Week ago
Hi All,

Currently I am automating IBM MQ messaging from UFT.For this I am using .net factory instance.

Problem which I am facing in it is given below:

Code:
Set oMQM = DotnetFactory.CreateInstance("IBM.WMQ.MQQueueManager",strMQMDLLPath1)

After passing correct path oMQM cannot be created.Its show empty after execution.

strMQMDLLPath1:It is path of amqmdxcs.dll DLL.



Please find the code below

Code:
Call FN_SEND_MESSAGE_TO_QUEUE("deepak", "WATCH.LIST.REQUEST", "SQACE_QAE", "", "CP_CLIENT","1419","57.253.139.71","C:\Program Files (x86)\IBM\WebSphere MQ Explorer\amqmdnet.dll","C:\Program Files (x86)\IBM\WebSphere MQ Explorer\amqmdxcs.dll")

Function FN_SEND_MESSAGE_TO_QUEUE (strMessage,strMessageQueue,strMQManager,strRemoteMQManager,strChannel,intPort ,strHostName,strMQMDLLPath,strMQMDLLPath1)

Dim oMQEnvironment  
Dim oMQM
Dim oMQC
Dim oMQMessage
Dim oMQQueue
Dim intOpenOptions
Dim QueueDll

Set oMQEnvironment = DotNetFactory.CreateInstance("IBM.WMQ.MQEnvironment",strMQMDLLPath)

'Initize the Environment
'With oMQEnvironment
    oMQEnvironment.HostName = strHostName
    oMQEnvironment.Port = intPort '1414
    oMQEnvironment.Channel = strChannel
'End with

On Error Resume Next
'Create MQ Instatnces
'throws an error when referencing amqmdnet.dll but works with amqmdxcs.dll
'Set oMQM = DotnetFactory.CreateInstance("IBM.WMQ.MQQueueManager",strMQMDLLPath)

'QueueDll = "C:\Program Files (x86)\IBM\WebSphere MQ Explorer\amqmdxcs.dll"
Set oMQM = DotnetFactory.CreateInstance("IBM.WMQ.MQQueueManager",strMQMDLLPath1)

'Check if MQM Connected
If Err.Number <> 0 Then

Reporter.ReportEvent micFail , "Step: Creating MQM Object" , "Unable to Connect to MQ Manager at" & strHostName
'Call FN_REVERT_TO_SELF
ExitTest
End If

Set oMQC = DotnetFactory.CreateInstance("IBM.WMQ.MQC",strMQMDLLPath)
Set oMQMessage = DotnetFactory.CreateInstance("IBM.WMQ.MQMessage",strMQMDLLPath1)
Reply


Messages In This Thread
IBM MQ messaging automation - by siteshag - 07-14-2014, 05:26 PM
RE: IBM MQ messaging automation - by maruthisunil - 10-11-2016, 11:08 PM
RE: IBM MQ messaging automation - by jayant - 10-13-2016, 05:38 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)