I own the following findings in order to work againts WMQ Secure-Channel:
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:
https://www-304.ibm.com/support/docview.wss?uid=swg1IC82112
Good that you found that Technote. Also make sure that...
SSLCAUTH(REQUIRED)
) that the app's personal certificate has a label matching the service account. Example, if the app is running as dotnetacct
the label of the personal cert in its keystore would be ibmwebspheremqdotnetacct
.amqssslc
sample to test your channel and certificates. This is usually at C:\Program Files (x86)\IBM\WebSphere MQ\tools\c\Samples\Bin\amqssslc.exe
and is one of the utilities supplied when installing the full client.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With