I own the following findings in order to work againts WMQ Secure-Channel:
- Defined Secure-Channel in the WMQ farm
- Public/Private keys
- Unmanaged Security-Exit assembly
My question is how to utilize these resources and interact with a Secure Channel using the XMS API? (Using C#)
This is what I've tried so far, but without success:
private IConnectionFactory CreateConnectionFactory()
{
XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, _wmqHostName);
connectionFactory.SetIntProperty(XMSC.WMQ_PORT, _wmqPort);
connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, _wmqChannel);
connectionFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, _wmqQueueManager);
connectionFactory.SetIntProperty(XMSC.WMQ_BROKER_VERSION, 0);
connectionFactory.SetStringProperty(XMSC.WMQ_SECURITY_EXIT, "MySecurityExitName");
return (connectionFactory);
}
I get the following error when calling it:
CWSMQ0006E: An exception was received during the call to the method ConnectionFactory.CreateConnection: CompCode: 2, Reason: 2195 . During execution of the specified method an exception was thrown by another component. See the linked exception for more information.
UPDATE:
I found the following Technote which describes my problem and its possible (not tested) solution: