1

Hi I want to use XMS library without installing mq client to my local machine,but I got these error.When i check ibm feature set they said we fix it but how?I also tried 8.0.0.7 version but error is same. http://www-01.ibm.com/support/docview.wss?uid=swg1IC89514

            var factoryfactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
            var connectionfactory = factoryfactory.CreateConnectionFactory();

            connectionfactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, QueueManagerName);
            connectionfactory.SetStringProperty(XMSC.WMQ_HOST_NAME, HostName);
            connectionfactory.SetIntProperty(XMSC.WMQ_PORT, Port);
            connectionfactory.SetStringProperty(XMSC.WMQ_CHANNEL, channelName);
            connectionfactory.SetIntProperty(XMSC.WMQ_BROKER_VERSION, XMSC.WMQ_BROKER_V2);
            connectionfactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);

            Console.WriteLine("Creating connection");
            var connection = connectionfactory.CreateConnection();
System.TypeLoadException: Could not load type 'IBM.WMQ.ManagedCommonServices' from assembly 'IBM.XMS.Client.WMQ, Version=8.0.0.6, Culture=neutral, PublicKeyToken=d2666ab12fca862b'.
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
JoshMc
  • 10,239
  • 2
  • 19
  • 38
Bilgehan
  • 1,135
  • 1
  • 14
  • 41

3 Answers3

2

You can try by adding the following in the app.config file <appSettings> <add key="MQCSCLASS" value="amqmdnet(IBM.WMQ.ManagedCommonServices)"/> </appSettings>– subbaraoc Oct 3 at 16:35

Use amqmdnet.dll (IBM.WMQ.ManagedCommonServices) for common default use IBM.XMS.Client.WMQ.dll (IBM.XMS.Client.WMQ.XmsManagedCommonServices) for XMS.

This will force the client library to directly load the common service class. This class has to be present in one of the search locations. E.g.: current working directory, GAC, ...

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Georg Sch.
  • 21
  • 2
0

I use XMS.NET so there was a bit more I had to do. First of all, you have to be on the correct version of the libraries for this to work.

After looking through the decompiled source of the XMS libraries, I found that the initialization calls look at your App.config file for the MQCSCLASS property as others have mentioned.

So adding the appropriate class to that property is necessary, I had to use the following:

You need to have a at least version 9.0.5 of the XMS Redistributable MQ libraries from IBM. You need to specifically configure client libraries for your setup, the documentation outlines that process. You'll need to reference the XMS.NET libraries in addition to amqmdnet.dll

SomeInternetGuy
  • 1,007
  • 12
  • 19
-1

No, not possible at the moment. MQ Client must be installed to use XMS because XMS uses underlying MQ .NET assemblies for connectivity to queue manager.

Shashi
  • 14,980
  • 2
  • 33
  • 52