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 API Support » MQSeries.NET package

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 MQSeries.NET package « View previous topic :: View next topic » 
Author Message
Shep
PostPosted: Tue May 13, 2003 9:10 am    Post subject: Does MA7P doc mention of amqmdnet.dll? Reply with quote

Newbie

Joined: 21 Jun 2002
Posts: 6
Location: Massachusetts

I ran into this same problem a few months back and had posted a warning on this in another thread. I did not find anywhere this was mentioned in the documentation or any of the samples.

To IBM...any word on a supported release and / or more complete documentation for the .Net samples / dll?

Shep
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Tue May 13, 2003 10:35 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

Shep,

Check out the following link and look for a post by Stephen Todd from IBM, down towards the bottom of the page. He talks about a level 3 supportpac possibly in June... Hopefully new documentation as well. I've ended up using Neil Kolban's in conjunction with the MQ Application Programming Guide and References. The IBM .chm file is, well, useless... (and ugly <g>)
http://www.mqseries.net/phpBB2/viewtopic.php?t=6040

The oversight of the namespace and assembly name surprised me. I must have looked over the docs until my eyes hurt. Kept thinking I missed it... Found it by looking in the sample compiler .bat file.

Just a quick thanks though to Neil Kolban for starting this effort and to IBM for seeing that it will continue. Nice work...
_________________
Leigh Kendall
Back to top
View user's profile Send private message
hcsiu
PostPosted: Thu May 29, 2003 1:43 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2003
Posts: 3

Hi Kolban,

I am trying out your classes and would like to ask if it can help my problem:

Dot net as client
MQ server on OS390

I need to pass user ID and password (guess it should be RemoteUserIdentifier and RemotePassword in MQCD struc), how it can be implemnted with our class.

Many thanks.
Back to top
View user's profile Send private message Send e-mail
mqcontinuum
PostPosted: Tue Sep 23, 2003 1:13 pm    Post subject: .NET API Not Working For Remote Queues Reply with quote

Newbie

Joined: 22 Sep 2003
Posts: 3

Wondering if anyone knows the answer to this one. I am using the new IBM classes (IBM.WMQ) in a VB.NET 2003 application on a Windows 2000 Pro machine running only the v5.2.1 client to try to connect to a Queue Manager on a remote server (either Win2k or AS400). Here's what I know:
    The client machine can access the remote server because I can ping it
    The client machine can connect to the remote server using both amqsputc and amqscnxc.
    There is one and only one Queue Manger defined on the remote server.
    I have full administrative access to both the client and server machines.

I am having problems using the MQQueueManager Class to connect to the remote machine. I specify the QueueManager name and I get back a RC 2058 (even with the MQSERVER environment variable set correctly). I have tried using the constructor that accepts a Queue Manager Name, a Channel Name, and a Connection Name, but this returns a RC 2277 and the following error in the Event Log:
Quote:
Event Type: Error
Event Source: MQSeries
Event Category: None
Event ID: 9498
Description:
The MQCD structure supplied was not valid. The value of the 'Version' field has the value '7'. This value is invalid for the operation requested. Change the parameter and retry the operation.

I've read that this may be due to the fact that the IBM classes only use version 7 of the MQCD structure but ignores versions 1-6. Is there a way to specify the MQCD structure to use? Has anyone been able to connect to a remote Queue Manager using these classes? I have only been able to get this to work in VB6 going directly against the API using the sample MQCONNXAny sub (with the Any parameter passed in as a MQCNOCD struct):
Code:
Declare Sub MQCONNXAny Lib "MQIC32.DLL" Alias "MQCONNXstd@20" _
    (ByVal QMgrName As String, _
           ConnectOpts As Any, _
           Hconn As Long, _
           CompCode As Long, _
           Reason As Long)

Type MQCNOCD
  ConnectOpts As MQCNO 'Options that control the action of MQCONNX'
  ChannelDef  As MQCD  'Channel definition for client connection'
End Type

I'm assuming it's possible because I have yet to see any posts from anybody with the same problem. I believe I'm probably doing something obviously wrong but need a little guidance (and some sample code). Any help would be greatly appreciated.

FYI, the code I'm using is very simple. Here it is:
Code:
Dim qMgr As New MQQueueManager(strQueueManagerName, strChannelName, strConnectionName)
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Tue Sep 23, 2003 4:14 pm    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

First off... version 5.3 of WebSphere MQ is required. See link at bottom of post. We're successfully using the MQ Classes for .NET in production in a couple of applications so I know this stuff works!

We're running a .NET Service which passes data to Serviced Components in COM+ which using DTC and SyncPoint, are writing a distributed transaction to Oracle and MQ.

Couple of things: check out the thread below that you participated in. The other user identified the problem:
http://www.mqseries.net/phpBB2/viewtopic.php?t=8910&highlight=net+client

Also check out the MA7P page. States that Webshpere 5.3 is required:
http://www-3.ibm.com/software/integration/support/supportpacs/individual/ma7p.html

HTH...
_________________
Leigh Kendall
Back to top
View user's profile Send private message
mqcontinuum
PostPosted: Wed Sep 24, 2003 4:58 am    Post subject: Problems Solved Using V5.3 Client Reply with quote

Newbie

Joined: 22 Sep 2003
Posts: 3

Thanks for the reply. Through a little more research, I discovered that the V5.3 client is a free download from IBM ! I installed it and was able to connect to my V5.2 servers.
Back to top
View user's profile Send private message
stephen_back
PostPosted: Thu Sep 25, 2003 5:10 pm    Post subject: difference between IBM.WMQ and IBM.WMQAX Reply with quote

Newbie

Joined: 25 Sep 2003
Posts: 2

Hi guys,

What is the difference between the IBM.WMQ classes and the IBM.WMQAX classes?

Why would you use one over the other?
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Thu Sep 25, 2003 6:59 pm    Post subject: Re: Problems Solved Using V5.3 Client Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

mqcontinuum wrote:
Thanks for the reply. Through a little more research, I discovered that the V5.3 client is a free download from IBM ! I installed it and was able to connect to my V5.2 servers.


The client is a free download. However, if you need to do distributed transactions, you'll need either the new transactional client or the full server. The transactional client is priced like the server.

Glad you got things working...
_________________
Leigh Kendall
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Thu Sep 25, 2003 7:08 pm    Post subject: Re: difference between IBM.WMQ and IBM.WMQAX Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

stephen_back wrote:
Hi guys,

What is the difference between the IBM.WMQ classes and the IBM.WMQAX classes?

Why would you use one over the other?


The IBM.WMQ is IBM's version of Neil Kolban's original work of converting the Java classes for MQ to classes for the .NET framework.

The IBM.WMQAX is IBM's COM component for accessing MQ.

If you're coding in .NET, use IBM.WMQ since it's managed code. If you're coding in VB6 or VC++ then use the ActiveX com component.

You could use the COM component from .NET using COM Interop, but that really would only make sense, IF, the classes for .NET were NOT available. Seeing that they are, use IBM.WMQ.

Also, Kolban's help file is much more helpful than the one included in MA7P; see: http://www.kolban.com/mq/DotNET/index.htm for the help file and other info. Also, you can use the Java programming guide for further clarification on some of the classes. See the IBM help file for the differences in classes between the .NET version and the Java version.

HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
stephen_back
PostPosted: Thu Sep 25, 2003 8:45 pm    Post subject: Re: difference between IBM.WMQ and IBM.WMQAX Reply with quote

Newbie

Joined: 25 Sep 2003
Posts: 2

Thanks Leigh,

Both the IBM.WMQ and IBM.WMQAX namespaces are in the .net assembly amqmdnet.dll

Many of the classes in IBM.WMQAX inherit of their namesake in IBM.WMQ. For example IBM.WMQAX.MQMessage inherits from IBM.WMQ.MQMessage which makes me think that they arent related to COM objects.
They seem to provide a higher level of functionality than the underlying WMQ classes. For example, there is an IBM.WMQAX.MQSession object that has only a default constructor. Presumably the channel and connection name are derived from the MQ client (or server) configuration. Another example is that WMQAX.MQMessage has a property called MessageString which is presumably derived from the underlying ReadString method using the messaegLength as the count parameter.

In the sample code that is installed with MA7P install, both namespaces are used. The WMQAX is used in the windows forms (xmqwrld.vb) and the WMQ is used in the console samples (vmqwrld.vb)

Regards,
Stephen
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Fri Sep 26, 2003 3:04 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

Right, sorry. They're actually the ActiveX wrapper classes. See the IBM .chm help file on this. Depending on how much code you have, you may want to just do a rewrite. Haven't used the wrapper classes, but if you're starting from scratch, just use IBM.WMQ with VB.NET or C#.

See cut/paste below from the help file:
=============================================

MQAX (WebSphere MQ COM classes) Compatibility classes

Visual Basic application writers use ActiveX as an interface to MQ. The .NET classes are based on a different model to the ActiveX offering. This means that when developers migrate their applications from Visual Basic to Visual Basic .NET, some effort will be spent in rewriting the calls to MQ.

To alleviate this problem, a set of AcitveX ‘wrapper’ classes are included which will lessen the amount of work required when migrating VB code to VB .NET.

Note: Although these wrappers will help with migrating COM classes to .NET, they do not assure 100% code compatibility.

The following WebSphere MQ ActiveX compatibility classes are supported:

MQGetMessageOptions

MQMessage

MQPutMessageOptions

MQQueue

MQQueueManager

MQSession


HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
crayon_coco
PostPosted: Wed Oct 08, 2003 2:25 am    Post subject: Help, the IBM.WMQ not found! Reply with quote

Apprentice

Joined: 08 Oct 2003
Posts: 33


I downloaded the MQSeries support pack for .net from ibm web site and installed on web server with the windows 2000 with the mqseries client installed

the problem is when i want to use the classes, i realise the IBM.WMQ dll is found? there's only the sample code

can anyone help? many thanks!
i need to send message to the as/400 with the mqseries installed, so do i need to install the client or server on my .net application?
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Wed Oct 08, 2003 3:47 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

The documentation is not very clear on what file to reference.

You need to add a project reference to the following file:
amqmdnet.dll.

It should be in the following directory (default):
C:\Program Files\IBM\WebSphere MQ\bin\amqmdnet.dll

Then import the namespace (VB.NET / C#):
Imports IBM.WMQ
using IBM.WMQ;

HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
crayon_coco
PostPosted: Wed Oct 08, 2003 6:00 pm    Post subject: Reason: 2277 ?? Reply with quote

Apprentice

Joined: 08 Oct 2003
Posts: 33



Thanks a lot for the help, i managed the find the dll and write a program on simple and this is the error message i get from my program
CompCode: 2, Reason: 2277

what is the problem? thanks in advance!
Back to top
View user's profile Send private message
Leigh Kendall
PostPosted: Fri Oct 10, 2003 8:50 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

Check the MQ Application Programming Reference. You can download the documentation at the following link:
http://www-3.ibm.com/software/integration/mqfamily/library/manualsa/

From that doc, 2277 is:
Quote:
MQRC_CD_ERROR
(2277, X’8E5’) Channel definition not valid.


CompCode or Completion Code of 2 translates to MQCC_FAILED. The MQ classes for .NET only return a reason code for failures. CompCode 0 is MQCC_OK, CompCode 1 is MQCC_WARNING.

For more info, check out page 72 of the WebSphere MQ Using Java documentation (pdf). It explains how things work. It's for Java, but the .NET classes are translated from these so it makes a good reference. For error codes, refer to the WebSphere MQ Application Programming Reference Appendix A: Return Codes.

HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Page 6 of 7

MQSeries.net Forum Index » IBM MQ API Support » MQSeries.NET package
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.