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 » Urgent Help - Get MQRFH2 in VB.NET

Post new topic  Reply to topic
 Urgent Help - Get MQRFH2 in VB.NET « View previous topic :: View next topic » 
Author Message
alanwlwong
PostPosted: Tue Apr 26, 2005 7:54 am    Post subject: Urgent Help - Get MQRFH2 in VB.NET Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear all,

I need to write a VB.NET program to read the message from MQ. However the other side is using JMS to send the message and the FORMAT is MQRFH2.

How can i read the message? need to readbyte? as JMS get the header file for MQRFH2.

I have tried a lot and also fail to get.

Would anyone help me? really thanks a lot.


Last edited by alanwlwong on Tue Apr 26, 2005 8:40 am; edited 1 time in total
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Apr 26, 2005 8:39 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

Have the other side not put on the MQRFH2 header in the first place. You can search this site for targclient and you'll get detailed information on how to do it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
alanwlwong
PostPosted: Tue Apr 26, 2005 8:42 am    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear bower5932,

I have searched but no found out.


Last edited by alanwlwong on Tue Apr 26, 2005 8:46 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 26, 2005 8:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's a button on this page, under "Serving MQSeries Professionals Worldwide".

It's called "Search".

Click on it, and put "targclient" in the search string field.

Welcome to the Internet.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
alanwlwong
PostPosted: Tue Apr 26, 2005 8:50 am    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear jefflowrey,

I have done it. but still no found out. Would you mind to give me some more concept. I know MQRFH2 gets the header of StrucID, version, strulength, Encoding, codedcharsetid, format, flags and CCSID.

But i don't know how to read from VB.NET.

is that i use

readstring (4) for first 4 bytes of StructID. then
readLong () for the version.

but seem gets corruption for doing this.

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 26, 2005 8:54 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If the sender changes their JMS Destination to use a target client of MQ...

Then there will be no MQRFH2 in the message.

So you won't have to read it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
alanwlwong
PostPosted: Tue Apr 26, 2005 8:57 am    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear jefflowrey,

But the other side is written by vendor, so they will put the header on it.
They will not change anything, so i could only handle in VB.NET

Cheers
Back to top
View user's profile Send private message
alanwlwong
PostPosted: Tue Apr 26, 2005 9:13 am    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear all,

please have some advice on the method to get RFH2 header in VB.NET...thousand thanks for all of u.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Apr 26, 2005 9:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If the RFH2 header is there (and you can't get the other side to 'remove' it), then you are going to have to a parse it out (probably using readbytes) to get to the real message payload. There is a description of the RFH2 header in the Application Programming Guide that gives you its layout.

However, I'd still suggest that you pursue its never being put on the message. I'm assuming that the other side is probably using JMSAdmin (or something similar) to create its destination. It is a very simple matter to specify you don't want the RFH2 header included. The targclient search mentioned earlier should give you dozens of hits on this.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Tue Apr 26, 2005 5:48 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Instead of using VB.net use J# to wrap the java delivered classes by creating your own receiver. You will still be able to get at the message but now you can do it in JMS which will automatically strip the RFH header.

Nice thing is after writing your classes in Java to receive and extract the message you can invoke them from VB.NET.

Thanks for CLR

Enjoy
Back to top
View user's profile Send private message Send e-mail
alanwlwong
PostPosted: Tue Apr 26, 2005 6:39 pm    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7

Dear all,

I only can use VB.NET to get the message. i can not use other jms problem to get the message first. sorry the only way is that i get the message from VB.net. Really headache on this.

Any function in MQ API that can convert the format?

Cheers
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 26, 2005 6:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Learn .NET!
You can use any langage supported in .NET
So write your classes in J# and instanciate from VB.NET !!

Back to top
View user's profile Send private message Send e-mail
alanwlwong
PostPosted: Tue Apr 26, 2005 7:45 pm    Post subject: Reply with quote

Newbie

Joined: 26 Apr 2005
Posts: 7



Sorry fjb_saper,

I just get the task on Monday. And he needs me to complete this week. And i am .NET beginner and I try my best to write .NET this few days. I can't get enough to search MQ, .NET, testing the program. Set the MQ.
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 API Support » Urgent Help - Get MQRFH2 in VB.NET
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.