Author |
Message
|
Trinadh Reddy |
Posted: Wed May 18, 2016 1:07 pm Post subject: Handling Response for HttpInput node |
|
|
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 |
|
 |
smdavies99 |
Posted: Wed May 18, 2016 9:51 pm Post subject: |
|
|
 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 |
|
 |
Vitor |
Posted: Thu May 19, 2016 5:04 am Post subject: Re: Handling Response for HttpInput node |
|
|
 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 |
|
 |
mayheminMQ |
Posted: Thu May 19, 2016 7:22 am Post subject: |
|
|
 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 |
|
 |
joebuckeye |
Posted: Fri May 20, 2016 5:27 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 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 |
|
 |
Vitor |
Posted: Fri May 20, 2016 5:39 am Post subject: |
|
|
 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 |
|
 |
Trinadh Reddy |
Posted: Mon May 23, 2016 12:04 am Post subject: |
|
|
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 |
|
 |
Trinadh Reddy |
Posted: Mon May 23, 2016 12:13 am Post subject: |
|
|
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 |
|
 |
|