Quantcast
Channel: Micro Focus QTP (UFT) Forums - All Forums
Viewing all articles
Browse latest Browse all 1653

IBM MQ messaging automation

$
0
0
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)

Viewing all articles
Browse latest Browse all 1653

Trending Articles