|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Enquiring queues in a queue manager using PCF in .Net |
« View previous topic :: View next topic » |
Author |
Message
|
prasannal |
Posted: Wed Feb 02, 2005 4:19 am Post subject: Enquiring queues in a queue manager using PCF in .Net |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
Similar question has come into this forum earlier, but I didn't get exact answer.
I want get all queues in a remote queue manager.
My code is as follow:
// Build an agent for the query.
PCFMessageAgent agent = new PCFMessageAgent("MQSI_CONF_QM");
// Build the query request.
PCFMessage requestMessage = new PCFMessage CMQCFC.MQCMD_INQUIRE_Q_NAMES);
requestMessage.AddParameter(IBM.WMQ.MQC.MQCA_Q_NAME, "*");
// Send the request and retrieve the response.
PCFMessage [] responses = agent.Send(requestMessage);
// Retrieve the values requested from the response.
string [] queueNames = responses[0].GetStringListParameterValue(CMQCFC.MQCACF_Q_NAMES);
I am using PCF API. My confusion is here how I will give my remote Queue Manager name?Does that should be set in environment?
Can I get answers to this.
Thanks,
Plad |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 02, 2005 4:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
For a remote queue manager, assuming the .NET interface has the same constructors as the java interface...
Code: |
PCFMessageAgent agent = new PCFMessageAgent(<Remote Hostname or IP>,<Remote Port Number>,<Remote Channel Name>); |
You don't need the queue manager name for a client connection - just the host, port number and channel name. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannal |
Posted: Wed Feb 02, 2005 10:12 pm Post subject: amqmdnet.dll and MQClient.dll |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi jeff,
I have added amqmdnet.dll and MQClient.dll as references.
But, still I am not getting API you have sent. I have only APi where I have to send QMgr name as string.
I have few confusion with using .Net, Hopefully I will get them resolved. I have few questions:
1. I think, I have older version of DLLs?
2. Like in Java, Can I set MQServer variable in my environment and let same code work?
3. If I am giving remote QMgr, I get following Exception:
Exception: System.Exception: An invalid binding type was specifiedin NMQ_MQ_LIB
at IBM.WMQ.MQQueueManager.Connect(String queueManagerName)
4. Can I access MQSeries5.2 with .Net? Or for this I need to upgrate or apply CSD?
Thanks,
Plad |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 03, 2005 6:04 am Post subject: Re: amqmdnet.dll and MQClient.dll |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
prasannal wrote: |
Hi jeff,
I have added amqmdnet.dll and MQClient.dll as references.
But, still I am not getting API you have sent. I have only APi where I have to send QMgr name as string. |
Then maybe the .NET PCF classes don't have the same constructors as the Java classes...
Try looking at configuring either the MQSERVER environment variable in the context of your running program or see if .NET has something like the MQEnvironment class that can set the hostname, port, and channel.
prasannal wrote: |
I have few confusion with using .Net, Hopefully I will get them resolved. I have few questions:
1. I think, I have older version of DLLs? |
I don't know.
prasannal wrote: |
2. Like in Java, Can I set MQServer variable in my environment and let same code work? |
I don't know, but try it.
prasannal wrote: |
3. If I am giving remote QMgr, I get following Exception:
Exception: System.Exception: An invalid binding type was specifiedin NMQ_MQ_LIB
at IBM.WMQ.MQQueueManager.Connect(String queueManagerName) |
That's just saying you can't establish BINDINGS connection on a remote queue manager.
prasannal wrote: |
4. Can I access MQSeries5.2 with .Net? Or for this I need to upgrate or apply CSD? |
The .NET interface is only supported with 5.3 at some fixpack level (FP4?). BUT, for a client connection, you can use a 5.3 client with a 5.2 queue manager.
Thanks,
Plad[/quote] _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|