|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Post/view queue messages on MQServer through MQClient in C# |
« View previous topic :: View next topic » |
Author |
Message
|
catty077 |
Posted: Wed Jan 26, 2005 5:02 pm Post subject: Post/view queue messages on MQServer through MQClient in C# |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 5
|
Hi All:
I have installed a trail version of Websphere MQ client and MQ Server on two boxes. Now, I want to post and view messages from my client to the server. MY IDE is Visual Studio.NET and language is C#. Is there any sample code out there to accomplish this task. Please help me out.
Looking forward for some response. I am in a time-critical situation to finish this.
Thanks in advance,
Anil. |
|
Back to top |
|
 |
JT |
Posted: Wed Jan 26, 2005 8:32 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 26, 2005 8:56 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Gooooooooooooooooooooooooogle. "MQ C# code"
Regards,
Roger |
|
Back to top |
|
 |
kirani |
Posted: Wed Jan 26, 2005 11:50 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Also, look into <wmq_home>\Tools\dotnet\samples\cs directory. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
swood |
Posted: Thu Jan 27, 2005 8:23 am Post subject: |
|
|
Novice
Joined: 10 Dec 2004 Posts: 20
|
I haven't used C# in a while so be careful with the syntax and case in here:
Hashtable ConSettings = New Hashtable();
ConSettings.Add(IBM.WMQ.MQC.CHANNEL_PROPERTY, _ClientChannel);//Channel set up on the server
ConSettings.Add(IBM.WMQ.MQC.HOST_NAME_PROPERTY, _HostName);//Ip address
ConSettings.Add(IBM.WMQ.MQC.PORT_PROPERTY, _PortNumber);
//ConSettings.Add(IBM.WMQ.MQC.GROUP_PROPERTY, "");//group authentication
//ConSettings.Add(IBM.WMQ.MQC.PASSWORD_PROPERTY, "");
//ConSettings.Add(IBM.WMQ.MQC.USER_ID_PROPERTY, "");
//ConSettings.Add(IBM.WMQ.MQC.TRANSPORT_PROPERTY, "tcp");
//ConSettings.Add(IBM.WMQ.MQC.SSL_CIPHER_SPEC_PROPERTY, ComboBoxSSLCipherSpec) ;
//ConSettings.Add(IBM.WMQ.MQC.SSL_PEER_NAME_PROPERTY, ComboBoxSSLPeerName) ;
//ConSettings.Add(IBM.WMQ.MQC.SSL_CERT_STORE_PROPERTY, ComboBoxSSLKeyRepository);
//ConSettings.Add(IBM.WMQ.MQC.SECURITY_EXIT_PROPERTY, ComboBoxSecurityExit.Text);
MQQueueManager _QM;
_QM = New MQQueueManager(_QueueManager, _ConSettings);
I don't use all the settings (this was donated by peterpotkay..thanks btw), couldn't get the username/password to work either that is why I just make sure my username/password matches the one on the server and both are in the administrators groups. I don't feel comfortable passing the username/password around anyway. In my case I just made a windows service and a connector component. The windows service runs under the proper username/password so it doesn't matter who logs into the computer.
This should get the connection. _________________ I don't know as much as I wish I did. |
|
Back to top |
|
 |
catty077 |
Posted: Thu Jan 27, 2005 9:36 am Post subject: Thank you so much |
|
|
Newbie
Joined: 26 Jan 2005 Posts: 5
|
I thank all of you for your help and suggestions. You guys are great! |
|
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
|
|
|
|