|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Generic exception;Could not load type 'IBM.WMQ.MQDestination |
« View previous topic :: View next topic » |
Author |
Message
|
sreenathgv |
Posted: Wed Apr 06, 2011 1:14 am Post subject: Generic exception;Could not load type 'IBM.WMQ.MQDestination |
|
|
Newbie
Joined: 18 Feb 2011 Posts: 1
|
Hi,
I am trying to push Byte array into MQ using ASP.Net. But I am getting issue as “Generic exception;Could not load type 'IBM.WMQ.MQDestination' from assembly 'amqmdnet“. I am able able to push normal XML message .
Here is my code…any suggestions..
queue = queueManager.AccessQueue(….);
message = strInputMsg;
queueMessage = new MQMessage();
utf8Enc = new UTF8Encoding();
byte[] inputByteArray = utf8Enc.GetBytes(strInputMsg.ToCharArray());
//**********************************************
queueMessage.Write(inputByteArray);
queueMessage.CharacterSet = 2208;
queueMessage.Format = MQC.MQFMT_IMS_VAR_STRING;
queuePutMessageOptions = new MQPutMessageOptions();
queue.Put(queueMessage, queuePutMessageOptions);
queueManager.Commit();
Thanks
Sreenath |
|
Back to top |
|
 |
shashikanth_in |
Posted: Sat Apr 09, 2011 4:50 am Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
What version of MQ are you using? There has been a change in MQ v7 where MQDestination is an abstract class. You will need to use either MQQueue or MQTopic.
Bit surprising, XML message works but not Byte array. This does not seem related to the exception you are getting. |
|
Back to top |
|
 |
MCardinal |
Posted: Wed Apr 20, 2011 3:21 am Post subject: |
|
|
Novice
Joined: 06 Oct 2010 Posts: 18 Location: Ottawa, Canada
|
Yes,
I'm using .net in another language but to put a message it's basically the same thing.
Create and MQQueueManager Object
Create a MQQueue Object with argument the Queue Manager previously created, name of the queue, permission etc ...
Create an Object MQMessage
'Not necessary to have an MQPutMEssageOption object for simple put
call function Write for the object type you want to write
And call the function put from the Queue Object
Clear up your connection and environement |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|