Author |
Message
|
csharpd |
Posted: Wed Apr 24, 2002 8:56 pm Post subject: |
|
|
Newbie
Joined: 23 Apr 2002 Posts: 6
|
hi
I am absolutely new to MQSeries and the .Net platform , but the requirements are such that i need to talk to MQSeries from C#. Kindly suggest me the approach to be taken.
thanks
|
|
Back to top |
|
 |
vedbhat |
Posted: Wed Apr 24, 2002 9:07 pm Post subject: |
|
|
 Disciple
Joined: 19 Mar 2002 Posts: 186 Location: Singapore
|
Hi,
When you install MQSeries, few samples are also installes under toolsCSamples. Take a look at these samples.
Regards
Ved
_________________ IBM Certified Solutions Expert - MQSeries Workflow
IBM Certified Specialist - MQSeries |
|
Back to top |
|
 |
kirani |
Posted: Wed Apr 24, 2002 9:17 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I don't think MQSeries API is available for C#.
|
|
Back to top |
|
 |
dpchiesa |
Posted: Mon Jun 03, 2002 3:15 pm Post subject: MQ and .NET |
|
|
 Apprentice
Joined: 29 May 2002 Posts: 46
|
MQ since v5.1 ships with MQAX, the MQ ActiveX library. This allows COM-based environments like Delphi and VB6 to access MQ via automation interfaces. You could even connect to MQ via a VBA macro in an Excel spreadsheet, and the MQAX examples show how.
.NET does COM interop quite well, and so .NET apps can use the same MQAX library. A necessary step is to create the interop assembly for MQAX - which is one line in a makefile or a couple of clicks in Visual Studio .NET.
There is a related discussion in the MQ Support API forum, see
http://www.mqseries.net/phpBB/viewtopic.php?p=11961
Also I believe you can get a working sample with source code at:
http://hosting.msugs.ch/cheeso9/dl/mq-dotnet.zip
-D _________________ -dpchiesa |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Jun 03, 2002 7:45 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi D,
Why did you do the "sn" (Strong Name) command in your makefile?
Note: On line 57 of your mqtest.cs program you have a typo (uppercase the "W"):
Code: |
Message.WriteString(.... |
P.S. Can I post your C# / MQ sample code to my web site (appropriately labelled - of course)?
later
Roger... |
|
Back to top |
|
 |
dpchiesa |
Posted: Wed Jun 05, 2002 7:30 am Post subject: typo etc |
|
|
 Apprentice
Joined: 29 May 2002 Posts: 46
|
re: typo - thanks.
That happened because I had used the MQAX from the MA7B supportpac (going WAY back). Apparently the interface for the MA7B library had a lower-case w, and it was changed for the version of MQAX shipped in MQ v5.1 and up. My makefile was using the old lib, which meant my code used the old method. I updated the code and the makefile and re-posted it to
http://hosting.msugs.ch/cheeso9/dl/mq-dotnet.zip
re: sn
this is the .net SDK tool that builds a strong-name key pair. It is necessary if you want to register an assembly for shared usage on the machine. (Register in the GAC). It is not necessary for DLLs that will be used by only a single app. So it's not really necessary in this example. I was fiddling with GAC registration and left the sn in the makefile.
you can post the sample - yes! Thanks for your efforts on that score.
-D _________________ -dpchiesa |
|
Back to top |
|
 |
|