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 » WebSphere Message Broker (ACE) Support » parsing a message containing MQRFH2 and MQXMIT headers

Post new topic  Reply to topic
 parsing a message containing MQRFH2 and MQXMIT headers « View previous topic :: View next topic » 
Author Message
sri
PostPosted: Sat Aug 14, 2004 9:38 pm    Post subject: parsing a message containing MQRFH2 and MQXMIT headers Reply with quote

Apprentice

Joined: 14 Mar 2004
Posts: 32
Location: Chennai - India

Hi

I have a XML message which contains MQRFH2 header. When this message comes to transmission queue, MQXMIT header is also get attached to it. My WBIMB message flow input queue is bounded to the transmission queue and readed this message which contains the MQRFH2 and MQXMIT header as input.

I dont know how to parse the message. Could any one tried parsing a message which contains both MQRFH2 and Transmission queue header.

Regards
Sri
Back to top
View user's profile Send private message
fschofer
PostPosted: Sun Aug 15, 2004 3:20 am    Post subject: Reply with quote

Knight

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

Why do you want to read a message from a transmission queue ?

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
sri
PostPosted: Sun Aug 15, 2004 3:36 am    Post subject: Reply with quote

Apprentice

Joined: 14 Mar 2004
Posts: 32
Location: Chennai - India

Actually Iam not reading from Transmission queue. I have a message exit on the receiver channel side and it will make a copy of the message passing the channel and put into the input queue of the flow.

Now the message comming into my flow input queue will look like

MQMD + MQXMIT + MQRFH2 + data
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun Aug 15, 2004 4:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sri wrote:
Actually Iam not reading from Transmission queue. I have a message exit on the receiver channel side and it will make a copy of the message passing the channel and put into the input queue of the flow.

Now the message comming into my flow input queue will look like

MQMD + MQXMIT + MQRFH2 + data

Change your exit so it doesn't do that. This is a very strange idea.

But the Transmission header should be defined in the Application Programming Reference. So if there isn't a predefined parser for the XMIT header, you can build an MRM model that describes that, and include the MQRFH2 header and your data as well.

But what you're doing is very very unusual, and I wouldn't recommend it unless you have a very good reason. And then I would think twice about the reason, and try and find a different way.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sri
PostPosted: Sun Aug 15, 2004 4:37 am    Post subject: Reply with quote

Apprentice

Joined: 14 Mar 2004
Posts: 32
Location: Chennai - India

My data is having NULL characters. I have declared the data type for this field as String.

The value of the field is getting terminated at the NULL location. how to accept null values with the data while parsing.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Aug 15, 2004 3:18 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Is this problem related to your XMIT Q problem? Were you able to resolve xmit q issue?

Please provide more details about your message structure that contains NULL char and the ESQL code.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
sri
PostPosted: Sun Aug 15, 2004 9:05 pm    Post subject: Reply with quote

Apprentice

Joined: 14 Mar 2004
Posts: 32
Location: Chennai - India

Actually my message structure is

MQXMIT header + MQRFH2 header + Data

I have defined a MRM which contains the fields related to

MQXMIT header + single field of type String (Length = end of bitstream).

This Single field will hold the rest of the message portion other than transmission header.

Using another MRM Iam planning to parse the MQRFH2 header and the data.

The problem is, Since iam treating the second field as String, the RFH2 header field getting truncated after 'RFH ' at the field 'STX' Hexa value '0x2' and iam not getting any value after this field.

If I treat this field as hexabinary, then I am getting the entire value but i am getting struck at the switch parser how to send this hexbinnary value as input.

Have anyone faced similar problem
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 16, 2004 5:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You want to model the field as a BLOB, not a string.

Then you can use the Create Field to parse the BLOB using your MRM message, or a pair of Reset Content Descriptor Nodes that first set the domain to BLOB and then set it to your MRM (with some compute nodes setting OutputRoot as necessary).

But again, you are doing something very strange, and you need to think twice or more often about doing it. It is very likely that you are making extra work for yourself, making your solution harder to maintain and harder to understand, and less reliable.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Aug 17, 2004 4:23 am    Post subject: A Better way to do this? Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Instead of having to mess around with the XMIT Q, I would have an intermediate mechanism to intercept the messages that are bound for the xmitq and make a copy of them before they get there. I had this dilema at a customer some time ago. I wrote a simple triggered app that read the mesage from the inputq, copied it includingthe MQMD to the outputq which was the XMITQ. It also then copied the message to another q which was used for logging the messages.
There is even a simpler solution., Just place your message flow between the output q of you app and the xmitq. Read the message, and output it to the XMITQ without change (An MQINput Node followed by an MQOutput Node) then from the output terminal of the Output Node you can do whatever you like with the message. There are other possibilities to solving this problem without having to mess with message exits on XMITQ's

that my 0.02p worth.
:
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » WebSphere Message Broker (ACE) Support » parsing a message containing MQRFH2 and MQXMIT headers
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.