Author |
Message
|
mqlover |
Posted: Mon Oct 08, 2012 6:26 am Post subject: Removing header from the incoming message |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Hi,
I have a requirement where in I have to remove the header of the message sent by the Adapter and then pass into the other system.
Am not sure on how to clear the header. Its a fixed message with 300 bytes allocated for the header.
I do have a message set created for the header, but am not sure on how to remove the header from the incoming message
Could anyone help on this?
Thanks |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Oct 08, 2012 6:29 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqlover |
Posted: Mon Oct 08, 2012 7:40 am Post subject: Removing header from the incoming message |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
Hi,
I am not using a SOAP message. Its an AS400 adapter used.
I need to extract only the header from a fixed length message and also I have a message set only for the header. There is no message modelling for the message body.
We have to just extract the header and just pass the message body. We need not validate the message body and we are unaware what is coming in the message body. SO there is only message set for the header. And also we have to just nullify the header part and send the message body only.
Thanks |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Oct 08, 2012 7:47 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Are you using the iSeries adapter? If so, what version? If so, are you using the DataQueueInput node? Is it from a keyed or non-keyed data queue? Are you using the BLOB parser or the MDM parser? What WMB version? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 08, 2012 7:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If you wish to remove an element from an output tree, you can either not copy it from the input tree, or you can explicitly set it to NULL, as the sample code posted shows.
If you wish to parse a portion of an incoming message, you can either read the incoming message as a BLOB and manually separate out the relevant portion and then ask Broker to construct a logical message tree from that portion (by using a parser), or you can construct a message description that matches the entire incoming message but only constructs a detailed model of the relevant fields and treats the rest of the message as a single blob or character field.
So, the first question is, do you have a model of the message from the AS400 adapter already? Do you already get a logical message tree that contains parsed out fields in the header and in the message body? Or do you get a raw stream of bytes? |
|
Back to top |
|
 |
mqlover |
Posted: Mon Oct 08, 2012 3:31 pm Post subject: Removing header from the incoming message |
|
|
Disciple
Joined: 25 Jul 2010 Posts: 176
|
I am using WMB version 7. Yes its an iSeries Adapter. Donno much details about the adapter as the code is already there.
Yeah tehre is a message set for the Header sent by the adapter and it is a fixed length header.
WE should not be parsing the message body and we should directly send it to downstream by just removing the header.
I shall try to parse the message to BLOB and then nullify the header.
Thanks |
|
Back to top |
|
 |
|