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 » HTTP Request Node ExceptionList not created on Error:

Post new topic  Reply to topic
 HTTP Request Node ExceptionList not created on Error: « View previous topic :: View next topic » 
Author Message
akashdwolf
PostPosted: Fri Feb 10, 2017 3:28 am    Post subject: HTTP Request Node ExceptionList not created on Error: Reply with quote

Apprentice

Joined: 09 Feb 2017
Posts: 28
Location: Mumbai

Dear All,

I am using HTTP Request node to call a URL.I need to capture the ExceptionList data in case the response is routed to Error terminal.

HTTP Request node Input Terminal----->Error Terminal.

I have successFully created a scenario were I call one of my URL internally and the response is routed to Error Terminal But the ExceptionList tree is not getting populated.

As Per the IBM documentation ExceptionList should be populated if the response is received from Error,Failure terminal.

Please note that if have created this scenario by sending timeout from internal URL to HTTP Request when it calls my internal URL.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Feb 10, 2017 4:28 am    Post subject: Reply with quote

Jedi Council

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

What about the Catch Terminal? Have you looked there?

Generally the error will be rolled back to the first Try/Catch node or failing that to the flow start node Catch Terminal BEFORE going to the Failure Terminal.

In my experience and with a cohesive set of error handling, I can't recall the last time I actually connected something up to the Failure Terminal.

There are reasons but for a long time, I have not needed to use it probably because all the grunt work with the exception is done in the code wired to the Catch Terminal.
_________________
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
fjb_saper
PostPosted: Fri Feb 10, 2017 5:34 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

smdavies99 wrote:
What about the Catch Terminal? Have you looked there?

Generally the error will be rolled back to the first Try/Catch node or failing that to the flow start node Catch Terminal BEFORE going to the Failure Terminal.

In my experience and with a cohesive set of error handling, I can't recall the last time I actually connected something up to the Failure Terminal.

There are reasons but for a long time, I have not needed to use it probably because all the grunt work with the exception is done in the code wired to the Catch Terminal.


Only downside is that the catch terminal does not include rolling back the existing Unit of Work, as is done when hitting the Failure terminal. This is the main reason for the throw node at the end of the catch flow.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Feb 10, 2017 6:09 am    Post subject: Reply with quote

Jedi Council

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

fjb_saper wrote:


Only downside is that the catch terminal does not include rolling back the existing Unit of Work, as is done when hitting the Failure terminal. This is the main reason for the throw node at the end of the catch flow.


Yep. That's whay I said that the code attached to the Catch Terminal does all the work.
That includes the error reporting using the ExceptionList and finally a THROW.
So you don't need anything wired to the Failure terminal if you handle things properly in the Catch Handling.
_________________
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
mgk
PostPosted: Sat Feb 11, 2017 9:23 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Quote:
the response is routed to Error Terminal But the ExceptionList tree is not getting populated.


This is correct behaviour. The HTTP Request node Error terminal is there to handle HTTP return codes other than a "200 OK". An ExceptionList is only produced when a message is sent to the Failure terminal of a node...
_________________
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
akashdwolf
PostPosted: Sat Feb 11, 2017 1:09 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Feb 2017
Posts: 28
Location: Mumbai

Thanks guys for your valueable respone.

As exceptionList is not created for Error Terminal,But how can I handle if the respone comes from Error terminal?

I tried using a try-catch:
Before HTTPRequest node I connected try terminal and I connected the catch terminal to a throw node.
But it is still not going to catch terminal so I am unable to handle it.

During debugging in the sub-flow after HTTP Respone node the debbuger shows that the flow has terminated but then it suddenly routes to SOAP Input CATCH terminal of the main flow and I get the below error:




ExceptionList
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp
Line:INTEGER:1153
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmSOAPInputNode
Name:CHARACTER:gen/FinacleESBService#FCMComposite_1_1
Label:CHARACTER:gen.FinacleESBService.SOAP Input
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\WebServices\WSLibrary\ImbSOAPReplyNode.cpp
Line:INTEGER:397
Function:CHARACTER:ImbSOAPReplyNode::evaluate
Type:CHARACTER:ComIbmSOAPReplyNode
Name:CHARACTER:gen/FinacleESBService#FCMComposite_1_3
Label:CHARACTER:gen.FinacleESBService.SOAP Reply
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3752
Text:CHARACTER:Error occurred in ImbSOAPReplyHelper::makeSOAPReply()
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\WebServices\WSLibrary\ImbSOAPReplyHelper.cpp
Line:INTEGER:767
Function:CHARACTER:ImbSOAPReplyHelper::makeSOAPReply
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3184
Text:CHARACTER:Warning: unable to send reply.
Insert
Type:INTEGER:5
Text:CHARACTER:http://localhost:7800/FinacleESBService
Back to top
View user's profile Send private message
akashdwolf
PostPosted: Sat Feb 11, 2017 1:11 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Feb 2017
Posts: 28
Location: Mumbai

Also I have not connected the error terminal of HTTP Request node.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sat Feb 11, 2017 11:12 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.

Normally, the Error handling code is connected to the Catch Terminal of the Node that starts the flow not halfway through the flow.

HTTP services generally have timeouts so using the debugger to step through things is not going to reproduce reliable results. I'd like to suggest that you use the usertrace facility + trace nodes instead. This is a really good skill to learn because there are cases when the debugger is not the best solution[1]

The error you just posted seems to indicate that the requestor of the flow timed out and closed the connection.
I most cases when I'm developing a SOAP or HTTP flow that calls a service in the middle I replace the HTTP or SOAP nodes that start the flow with a MQInput and an MQOutput Nodes.
These don't timeout so I can work on the internals without having to worry about the requestor of my flow under development timing out. Just a suggestion.

[1] To be honest, I could not use the IIB Debugger without learining it. All the flows Ihave developed since 2003 have been done using UserTrace so I might be a bit biased.
_________________
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
akashdwolf
PostPosted: Sun Feb 12, 2017 1:12 am    Post subject: Reply with quote

Apprentice

Joined: 09 Feb 2017
Posts: 28
Location: Mumbai

Thanks smadavies99 for suggesting the queue base approach.I would surely try it.
Back to top
View user's profile Send private message
akashdwolf
PostPosted: Sun Feb 12, 2017 1:29 am    Post subject: Reply with quote

Apprentice

Joined: 09 Feb 2017
Posts: 28
Location: Mumbai

mgk wrote:
Quote:
the response is routed to Error Terminal But the ExceptionList tree is not getting populated.


This is correct behaviour. The HTTP Request node Error terminal is there to handle HTTP return codes other than a "200 OK". An ExceptionList is only produced when a message is sent to the Failure terminal of a node...



As you mentioned,Where in the tree can I see the status code for Error Terminal routing.
I have observed that in case the message routes to Error terminal there is a tree created as Message.BLOB which has BLOB data which on conversion to string creates an xml message that has the error description.

Should I use this BLOB Message to capture the error?How reliable could it be?
Back to top
View user's profile Send private message
mgk
PostPosted: Sun Feb 12, 2017 3:59 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Quote:
Also I have not connected the error terminal of HTTP Request node.


You need to connect the Error terminal if you want to handle the output from the Error terminal. Not connecting it causes the Error response to be thrown away and ignored. As far as the Request node is concerned the Error terminal is just like an "Out" terminal with a different name - the HTTP Request completed just fine - but the response came back with an HTTP Level Error code so effectively the Error terminal is allowing you to "filter" Error responses from 200 OK responses which go to the Out terminal. And if you don't wire an Out terminal the message is thrown away and the Error terminal is just the same.

Quote:
I have observed that in case the message routes to Error terminal there is a tree created as Message.BLOB which has BLOB data which on conversion to string creates an xml message that has the error description.


This is correct because the Response message could be XML or JSON or HTML or something else, so it just uses a Blob to catch everything and let's you format it in the next node wired to it if that's what you need to do. If you check the Content-type is XML then you should be safe to format it as XML for example.

Quote:
Should I use this BLOB Message to capture the error?


Yes, the Blob is the "body" of the response that came back. But you could wire the Error terminal to a "Throw" node if you simply want to return it to the caller.

Quote:
Where in the tree can I see the status code for Error Terminal routing


I think it's before the Blob message in the HTTPResponseHeader parser, but it could be in the LocalEnvironment - I can't remember which...


Kind regards,
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » HTTP Request Node ExceptionList not created on Error:
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.