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 » How to code Java Compute Node to strip HTTResponseHeader?

Post new topic  Reply to topic
 How to code Java Compute Node to strip HTTResponseHeader? « View previous topic :: View next topic » 
Author Message
simon.starkie
PostPosted: Thu Apr 12, 2007 11:42 am    Post subject: How to code Java Compute Node to strip HTTResponseHeader? Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

We may typically use the following ESQL to strip the HTTPResponseHeader:
--strip off the HTTP headers
SET OutputRoot.HTTPResponseHeader = null;

What is the equivalient code in Java to accomplish the same result and strip off the HTTP headers, please?

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 12, 2007 11:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

As in all cases with Broker, it's easier to not copy stuff across than it is to delete them later.

But you should be able to detach the MbElement and then set it to Null.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Ranodip Basu
PostPosted: Tue Apr 17, 2007 12:14 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Sep 2004
Posts: 48

Hi Simon,

The Java code will be like this :

outMessage.getRootElement().getFirstElementByPath.("HTTPResponseHeader").detach();

Thanks & Regards,
Ranodip
Back to top
View user's profile Send private message
simon.starkie
PostPosted: Wed Apr 25, 2007 2:57 pm    Post subject: Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

Thanks very much Ranodip.
The following worked:

public void evaluate(MbMessageAssembly contact admin) throws MbException {
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");

MbMessage outMessage = new MbMessage(contact admin.getMessage());
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin, outMessage);

// strip HTTPResponseHeader
outMessage.getRootElement().getFirstElementByPath("HTTPResponseHeader").detach();

// create MQMD
addMqmd(outMessage);
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 » How to code Java Compute Node to strip HTTResponseHeader?
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.