|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTPError message scenario |
« View previous topic :: View next topic » |
Author |
Message
|
mqxplorer |
Posted: Wed Sep 30, 2009 7:09 am Post subject: HTTPError message scenario |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi All,
I need to create a scenario where I get the http error message. As per my understanding from info center, when the http request node succeeds in posting the request to the webservice and if the web service is not succeesful we get the error message. There was a situation where we had some problem with the backend application and we could create the scenario for getting the eeror message, however, we cannot do it every time as the backend application is really busy. I have tried to set the timeout interval to 0 (zero) on HTTPRequest node, however, I could get a failure message. How can I create a scenario where I can get the error message without touching the backend applucation?
Thanks in advance |
|
Back to top |
|
 |
Luke |
Posted: Wed Sep 30, 2009 7:23 am Post subject: |
|
|
Centurion
Joined: 10 Nov 2008 Posts: 128 Location: UK
|
I usually create a 'stub' for unit testing - another flow which just has HTTPInput node --> compute node --> HTTPReply ...
Configure your request flow to talk to the 'stub' flow and configure the stub to return whatever you want - including error conditions. |
|
Back to top |
|
 |
mqxplorer |
Posted: Wed Sep 30, 2009 7:55 am Post subject: |
|
|
 Master
Joined: 22 Jun 2009 Posts: 206
|
Hi Luke,
Thanks for your reply. I have created a stub flow with HTTPInput --> Compute --> HTTPReply ...
I have set the time interval on HTTPRequest node as 10sec and while debugging the flow, I have exceed the time interval and the message goes to failure terminal.
What manual says is:
Quote: |
You can specify a timeout interval, so that if the request takes longer than the specified duration, the request is propagated to the Error terminal with an appropriate message. |
This is what I have the info from from Info center. What can I do get an error message?
Thanks |
|
Back to top |
|
 |
Luke |
Posted: Wed Sep 30, 2009 8:23 am Post subject: |
|
|
Centurion
Joined: 10 Nov 2008 Posts: 128 Location: UK
|
Hi,
Yeah, it does say that doesn't it ... although it subsequently says that HTTP status code errors are sent to the Error terminal, while TCP/IP errors go to the Failure terminal.
It's been a while since I did a flow with HTTP, so don't remember what happened in my testing of this scenario ...
You could send a response back with a HTTP error response code, that should definitey go down the Error terminal. |
|
Back to top |
|
 |
nheng |
Posted: Thu Oct 01, 2009 8:06 pm Post subject: answer |
|
|
 Apprentice
Joined: 07 Dec 2007 Posts: 39
|
Check ExceptionList.*[1].Number = 3150,3151,3152
3150 = Socket error
3151 = Timeout
3152 = Socket error detected whilst invoking Web service
It may be useful for u. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|