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 » Removing header from the incoming message

Post new topic  Reply to topic
 Removing header from the incoming message « View previous topic :: View next topic » 
Author Message
mqlover
PostPosted: Mon Oct 08, 2012 6:26 am    Post subject: Removing header from the incoming message Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Mon Oct 08, 2012 6:29 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Code:
SET InputRoot.SOAP.Header = NULL;

_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqlover
PostPosted: Mon Oct 08, 2012 7:40 am    Post subject: Removing header from the incoming message Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Mon Oct 08, 2012 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Oct 08, 2012 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
mqlover
PostPosted: Mon Oct 08, 2012 3:31 pm    Post subject: Removing header from the incoming message Reply with quote

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
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 » Removing header from the incoming message
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.