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 » HTTPResponseHeader

Post new topic  Reply to topic
 HTTPResponseHeader « View previous topic :: View next topic » 
Author Message
mangoMan
PostPosted: Tue Sep 28, 2004 11:22 am    Post subject: HTTPResponseHeader Reply with quote

Acolyte

Joined: 16 Oct 2003
Posts: 69

I have to respond to the calling webservice with an HTTP status code of 500. So I create my own HTTPResponseHeader

Quote:

SET OutputRoot.HTTPResponseHeader."X-Original-HTTP-Status-Line" = 'HTTP/1.1 500 Internal Server Error';
SET OutputRoot.HTTPResponseHeader."X-Original-HTTP-Status-Code" = '500';
SET OutputRoot.HTTPResponseHeader."Content-Type" = 'text/html';


but when I trace the msg on the other side the header looks like this:

Quote:

(0x01000000):HTTPResponseHeader = (
(0x03000000):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK'
(0x03000000):X-Original-HTTP-Status-Code = 200
(0x03000000):Content-Type = 'text/xml; charset=utf-8'
(0x03000000):Content-Length = '761'
(0x03000000):Date = 'Tue, 28 Sep 2004 17:14:48 GMT'
(0x03000000):Server = 'Apache Coyote/1.0'
(0x03000000):Connection = 'close'
)


what is happening? I did remember to uncheck "Generate HTTP headers from input or response" but I also tried it with it checked but no luck
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Sep 28, 2004 1:49 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

As you have found, the default HTTP Status Code is 200 (meaning "OK").

To change this, you need to set the reply status code to the desired value in the LocalEnvironment in a Compute Node, e.g.

SET OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode = '500';

This allows the HTTPReply node to report an error (or any other valid HTTP Status-Code) back to the requesting client.

Cheers,
_________________
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
mangoMan
PostPosted: Wed Sep 29, 2004 3:38 pm    Post subject: Reply with quote

Acolyte

Joined: 16 Oct 2003
Posts: 69

Thank you! I am back in action.
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 » HTTPResponseHeader
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.