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 » HTTP Response Headers

Post new topic  Reply to topic
 HTTP Response Headers « View previous topic :: View next topic » 
Author Message
saddankula
PostPosted: Fri Nov 15, 2013 9:21 am    Post subject: HTTP Response Headers Reply with quote

Acolyte

Joined: 27 Jun 2013
Posts: 51

how to set HTTP Response Headers to http request node dynamically in message broker
Back to top
View user's profile Send private message
NealM
PostPosted: Fri Nov 15, 2013 9:50 am    Post subject: Reply with quote

Master

Joined: 22 Feb 2011
Posts: 230
Location: NC or Utah (depends)

Use the SOAPEnvelope node in front of it.



Update: Oops! (see next post)


Last edited by NealM on Fri Nov 15, 2013 6:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Nov 15, 2013 12:45 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
Use the SOAPEnvelope node in front of it.


Please don't use that - it will not add HTTP Headers.

Do you mean you want to add http request headers before an HTTPRequest node or response headers before an HTTPReply node? To add HTTPResponse headers, simple create an HTTPResponseHeader parser before the HTTPReply node and populate it with any headers you need. For the request case create an HTTPRequestHeader in a similar way before the HTTPRequest node. E.G:

Code:
SET OutputRoot.HTTPRequestHeader.MyHeader = 42;


The docs do have examples of this

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
saddankula
PostPosted: Mon Nov 18, 2013 2:16 am    Post subject: Reply with quote

Acolyte

Joined: 27 Jun 2013
Posts: 51

I Add the 'HTTPResponseHeader' parser in front of HTTP reply node.

CREATE NEXTSIBLING of OutputRoot.Properties DOMAIN 'HTTPResponseHeader' NAME 'HTTPResponseHeader';

set OutputRoot.HTTPResponseHeader."X-Original-HTTP-Status-Line"='HTTP/1.1 500 OK';

but when HTTP reply node sends the response to HTTP request node the default value will be set to X-Original-HTTP-Status-Line"='HTTP/1.1 200 OK';
but i want to set X-Original-HTTP-Status-Line"='HTTP/1.1 500 OK';


How can i change.
Back to top
View user's profile Send private message
mgk
PostPosted: Mon Nov 18, 2013 3:05 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Do you really need to send a "500 OK" reply?

The best way to set the status code is to set it in the LE:

Code:
SET OutputLocatEnvironment.Destination.HTTP.ReplyStatusCode = 500;

and make sure your "compute mode" on the node includes "Environment".

Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » HTTP Response 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.