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 IndexWebSphere Message Broker SupportWMB - Issue setting HTTP ReplyStatusCode to HTTP/1.1 400

Post new topicReply to topic
WMB - Issue setting HTTP ReplyStatusCode to HTTP/1.1 400 View previous topic :: View next topic
Author Message
Srinivas Kale
PostPosted: Wed Apr 19, 2017 2:13 am Post subject: WMB - Issue setting HTTP ReplyStatusCode to HTTP/1.1 400 Reply with quote

Newbie

Joined: 22 Aug 2008
Posts: 2
Location: Bangalore

Hi All,
Can anyone help me with below query. Facing some weird issue when setting HTTP Reply Status Code in failure scenarios with HTTPS option enabled in HTTP Input node.

WMB Version: V 8

Requirement: We need to update the HTTP Reply Status Code depends on the response. Success 200, Any Issue with Request 400, All other case 500 when sending the response back to the consumer.

Flow :
HTTP Input Node (HTTPS enabled) ----> Compute Node (Compute mode property as Message and Local Environment) ----> HTTP Reply Node

Compute Node Code :
Copy Message Headers;
SET OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode = '400';

Expected Output:
In the final response of HTTP headers, Expecting X-Original-HTTP-Status-Line as 'HTTP/1.1 400 Bad Request'. But in the final response value appears to be 'HTTP/1.1 200 OK'. Only X-Original-HTTP-Status-Code and ReplyStatusCode values of HTTP Headers updated to 400, Not the X-Original-HTTP-Status-Line value.

HTTP Headers in the Response :
HTTP/1.1 200 OK
X-Backside-Transport: FAIL FAIL
Connection: Keep-Alive
Transfer-Encoding: chunked
Server: Apache-Coyote/1.1
X-Original-HTTP-Status-Code: 400
ReplyStatusCode: 400

Content-Type: application/json
Date: Wed, 19 Apr 2017 09:41:41 GMT

Expecting X-Original-HTTP-Status-Line value as 'HTTP/1.1 400 Bad Request' when setting ReplyStatusCode as '400' and 'HTTP/1.1 500 Internal Server Error' when setting ReplyStatusCode as '500'. Where as value set to 'HTTP/1.1 200 OK' in the final response in all scenario irrespective of ReplyStatusCode value under OLE.

However same flow with same logic working with 'DISABLING HTTPS option' in HTTP Input Node.
Flow : HTTP Input Node (With HTTP) ----> Compute Node(Compute mode property as Message and Local Environment) ----> HTTP Reply Node
Compute Node:
Copy Message Headers;
SET OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode = '400';
Output:
Could see 'HTTP/1.1 400 Bad Request' when ReplyStatusCode is '400' and 'HTTP/1.1 500 Internal Server Error' when ReplyStatusCode is '500'.

Question: How can we update the HTTP Reply Status (X-Original-HTTP-Status-Line) to 400 or 500 with HTTPS enabled? I need to enable the HTTPS option as request comes to WMB Flow from Secured Datapower layer.


Thanks In Advance.
Back to top
View user's profile Send private message
Srinivas Kale
PostPosted: Wed Apr 19, 2017 3:14 am Post subject: Resolved Reply with quote

Newbie

Joined: 22 Aug 2008
Posts: 2
Location: Bangalore

Thanks all who are looking in to the issue. Its self resolved. Issue from Datapower layer. With HTTPS enabled we are testing the service from Datapower layer, When looked at the dp logs received the '400 Bad Request' as status code in the headers. So, We are updating the datapower code now.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportWMB - Issue setting HTTP ReplyStatusCode to HTTP/1.1 400
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.