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 » Handling Response for HttpInput node

Post new topic  Reply to topic
 Handling Response for HttpInput node « View previous topic :: View next topic » 
Author Message
Trinadh Reddy
PostPosted: Wed May 18, 2016 1:07 pm    Post subject: Handling Response for HttpInput node Reply with quote

Newbie

Joined: 18 May 2016
Posts: 4

Hi Team this is Trinadh,

Please help me with this issue.

here my flow has HttpInput Node and Transformation using Compute node and HttpReply.

wen in certain case the flow gets failed wen tested with SoapUI , i'm getting 500 status error, is there any way to modify the status to something else.

Wen failed HttpInput generates the response and wen successful HttpReply node generates the response .

I'm looking forward for handling error responses and status from HttpInput node.....

please help me

Thanks in Advance.[/b]
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed May 18, 2016 9:51 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Can a moderator please move this thread to the Broker forum

Thanks
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 19, 2016 5:04 am    Post subject: Re: Handling Response for HttpInput node Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Trinadh Reddy wrote:
wen in certain case the flow gets failed wen tested with SoapUI , i'm getting 500 status error, is there any way to modify the status to something else.


Like a 200 so it looks like it worked?


Trinadh Reddy wrote:
I'm looking forward for handling error responses and status from HttpInput node.....


Perhaps you could expand a little on:

- why you want to change the status code of a failing flow from a code that indicates it failed;
- what you want to change it to;
- why the usual error handling mechanisms within IIB (principal among them the Catch terminal) have failed to meet your needs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mayheminMQ
PostPosted: Thu May 19, 2016 7:22 am    Post subject: Reply with quote

Voyager

Joined: 04 Sep 2012
Posts: 77
Location: UK beyond the meadows of RocknRoll

I am not going to say anything on your design as the valid questions have been asked by Vitor and you should think on them first.

If there is a super specific need to change the reply code, look at OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode to set it to a value you require.

Quote:
why you want to change the status code of a failing flow from a code that indicates it failed;

I had a scenario where the client did not want anything apart from 200 coming in, with the entire error message placed in a soap fault message and actual error code placed within Soap fault code. Something with their application that did not like any code apart from 200.
_________________
A Colorblind man may appear disadvantaged but he always sees more than just colors...
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri May 20, 2016 5:27 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 364
Location: Columbus, OH

mayheminMQ wrote:
I had a scenario where the client did not want anything apart from 200 coming in, with the entire error message placed in a soap fault message and actual error code placed within Soap fault code. Something with their application that did not like any code apart from 200.


Hope no one calls that endpoint with a SOAP node from broker. That node will throw an error if it receives a SOAP fault with a status code of 200.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 20, 2016 5:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

joebuckeye wrote:
mayheminMQ wrote:
I had a scenario where the client did not want anything apart from 200 coming in, with the entire error message placed in a soap fault message and actual error code placed within Soap fault code. Something with their application that did not like any code apart from 200.


Hope no one calls that endpoint with a SOAP node from broker. That node will throw an error if it receives a SOAP fault with a status code of 200.




But the reason I know that is that an external vendor did that to us. Their "reasoning" (and I shudder at the thought process involved) was that they'd successfully sent a SOAP Fault back and the 200 code indicated that. A 500 code from them was to indicate that they'd failed to send the fault.

We ended up using an HTTPRequest node and parsing the response with code. They refused to change as "they'd been doing this for years with a number of customers and we were the only ones complaining".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Trinadh Reddy
PostPosted: Mon May 23, 2016 12:04 am    Post subject: Reply with quote

Newbie

Joined: 18 May 2016
Posts: 4


Perhaps you could expand a little on:

- why you want to change the status code of a failing flow from a code that indicates it failed;
- what you want to change it to;
- why the usual error handling mechanisms within IIB (principal among them the Catch terminal) have failed to meet your needs.



Hi Team,

thanks for the responses. i'm really glad.

The thing is here the client implemented his code to handle errors and he has nothing to do with status 500 and its description.

Have to override 500 error status to 400 status.
Tried attaching the catch and failure terminals to the compute node and hope to catch errors but i didn't find anything related to status in the tree .

hope this helps
Back to top
View user's profile Send private message Send e-mail
Trinadh Reddy
PostPosted: Mon May 23, 2016 12:13 am    Post subject: Reply with quote

Newbie

Joined: 18 May 2016
Posts: 4

mayheminMQ wrote:
I am not going to say anything on your design as the valid questions have been asked by Vitor and you should think on them first.

If there is a super specific need to change the reply code, look at OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode to set it to a value you require.

Quote:
why you want to change the status code of a failing flow from a code that indicates it failed;

I had a scenario where the client did not want anything apart from 200 coming in, with the entire error message placed in a soap fault message and actual error code placed within Soap fault code. Something with their application that did not like any code apart from 200.



Here i'm not trying to change the reply but looking forward changing the error status which is obtained at the HTTPInput terminal wen exception is raised.

and i tired implementing the code "OutputLocalEnvironment.Destination.HTTP.ReplyStatusCode " but didn't get any result .


Here first we need to catch the 500 status and then we have override it .

Hope this helps.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Handling Response for HttpInput node
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.