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 » General Discussion » RFH Header

Post new topic  Reply to topic
 RFH Header « View previous topic :: View next topic » 
Author Message
mbieren
PostPosted: Wed Oct 05, 2005 4:04 am    Post subject: RFH Header Reply with quote

Newbie

Joined: 05 Oct 2005
Posts: 3
Location: Muenchen

Hi there,

I have messages with an RFH Header created by a Java Programm. Can somebody point me to the C example to read out the messages _without_ the RFH-Stuff. Is it an MQ Option ? I am using a Simple MQGET - Call as described in the examples.

Kind regards

Michael
Back to top
View user's profile Send private message
Nigelg
PostPosted: Wed Oct 05, 2005 4:36 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

No, it is not a WMQ option.
Once you get the msg, read the StrucLength from the RFH header. The next part of the msg starts at that offset into the whole msg.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
fschofer
PostPosted: Wed Oct 05, 2005 4:58 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
take a look at Support Pack IH03 => mqcapture.c

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
mbieren
PostPosted: Wed Oct 05, 2005 7:11 am    Post subject: Reply with quote

Newbie

Joined: 05 Oct 2005
Posts: 3
Location: Muenchen

Like this

Code:

/* check the message format for an RFH */
                                if ((memcmp(msgdesc.Format, MQFMT_RF_HEADER, sizeof(MQFMT_RF_HEADER) - 1) == 0) ||
                                        (memcmp(msgdesc.Format, MQFMT_RF_HEADER_2, sizeof(MQFMT_RF_HEADER_2) - 1) == 0))
                                {
                                        rfhlength = checkRFH(msgdata, datalen, &msgdesc);
                                }

/* and then */
fwrite(msgdata + rfhlength, datalen - rfhlength, 1, outFile);


This is strange. How can theses JavaGuys include their stuff in the MessageBody.

Anyway I have filtered it with :

Code:

jms_crap = "</jms>"
jmspos = mqmessage.find (jms_crap)
if  jmspos >= 0:
    encoded = mqmessage [jmspos + len (jms_crap):].lstrip ()


Cause "</jms>" plus some blanks is the last stuff

Kind regards

Michael
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Oct 05, 2005 8:31 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
plus some blanks

Not always. It depends on the length of the data in the last "folder".

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
mbieren
PostPosted: Thu Oct 06, 2005 12:45 am    Post subject: Reply with quote

Newbie

Joined: 05 Oct 2005
Posts: 3
Location: Muenchen

we will see *ggg*

I know the stuff that has to come after </jms> I will check for it and raise an exception if I did not see what I expect.

Kind regards

Michael
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 » General Discussion » RFH Header
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.