ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Post/view queue messages on MQServer through MQClient in C#

Post new topic  Reply to topic
 Post/view queue messages on MQServer through MQClient in C# « View previous topic :: View next topic » 
Author Message
catty077
PostPosted: Wed Jan 26, 2005 5:02 pm    Post subject: Post/view queue messages on MQServer through MQClient in C# Reply with quote

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
View user's profile Send private message
JT
PostPosted: Wed Jan 26, 2005 8:32 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

http://www.developer.ibm.com/tech/sampmq.html

No C#, but there are sample programs in C/C++ that provide the basics.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Jan 26, 2005 8:56 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Gooooooooooooooooooooooooogle. "MQ C# code"

Regards,
Roger
Back to top
View user's profile Send private message Visit poster's website
kirani
PostPosted: Wed Jan 26, 2005 11:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
swood
PostPosted: Thu Jan 27, 2005 8:23 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
catty077
PostPosted: Thu Jan 27, 2005 9:36 am    Post subject: Thank you so much Reply with quote

Newbie

Joined: 26 Jan 2005
Posts: 5

I thank all of you for your help and suggestions. You guys are great!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Post/view queue messages on MQServer through MQClient in C#
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.