使用UFT的DotNetFactory对象,我正在尝试连接启用SSL的通道,如下所示。但它抛出的invokation错误。任何人都可以查看下面的VBSCript代码和帮助。
strQMgrName = "MQQM"
strMQMDllPath = "C:\\Program Files (x86)\\IBM\WebSphere MQ\\bin\\amqmdnet.dll"
Set oMqEnvironment = DotNetFactory.CreateInstance("IBM.WMQ.MQEnvironment",strMQMDllPath)
oMqEnvironment.Hostname = "MQQM.SRVR.COM"
oMqEnvironment.Port = "1234"
oMqEnvironment.Channel = "MQQM.CHNL.SSL"
oMqEnvironment.SSLCipherSpec = "SSL_RSA_WITH_AES_128_CBC_SHA"
'oMqEnvironment.SSLCipherSpec = "TLS_RSA_WITH_AES_128_CBC_SHA" 'tried with this as well
oMqEnvironment.SSLKeyRepository = "C:\SSLKeyRepository\MQQMKey.kdb"
Set oMQC = DotNetFactory.CreateInstance("IBM.WMQ.MQC",strMQMDllPath)
' qmanager name,channel name, connection name
Set oMqQMgr = DotNetFactory.CreateInstance("IBM.WMQ.MQQueueManager",strMQMDllPath,strQMgrName)
Msgbox oMqQMgr.IsConnected
MQQMKey.kdb放在目录C:\ SSLKeyRepository中,其中包含其他必需文件MQQMKey.sth和MQQMKey.rdb
我还尝试使用UFT连接到支持SSL的QM - API测试标准活动IBM WebSphere MQ但没有结果。请参阅附件。