Author |
Message
|
sri |
Posted: Sat Aug 14, 2004 9:38 pm Post subject: parsing a message containing MQRFH2 and MQXMIT headers |
|
|
 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 |
|
 |
fschofer |
Posted: Sun Aug 15, 2004 3:20 am Post subject: |
|
|
 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 |
|
 |
sri |
Posted: Sun Aug 15, 2004 3:36 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Sun Aug 15, 2004 4:23 am Post subject: |
|
|
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 |
|
 |
sri |
Posted: Sun Aug 15, 2004 4:37 am Post subject: |
|
|
 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 |
|
 |
kirani |
Posted: Sun Aug 15, 2004 3:18 pm Post subject: |
|
|
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 |
|
 |
sri |
Posted: Sun Aug 15, 2004 9:05 pm Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Mon Aug 16, 2004 5:00 am Post subject: |
|
|
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 |
|
 |
smdavies99 |
Posted: Tue Aug 17, 2004 4:23 am Post subject: A Better way to do this? |
|
|
 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 |
|
 |
|