|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IIB9: HTTP Input: Simplest way to return a Custom Fault Form |
« View previous topic :: View next topic » |
Author |
Message
|
akil |
Posted: Mon Oct 27, 2014 11:53 pm Post subject: IIB9: HTTP Input: Simplest way to return a Custom Fault Form |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
Hi
The Fault Format in the HTTP Input has 3 options SOAP 1.1, SOAP 1.2 & HTML..
What's the simplest way to define a custom fault format ? By custom i mean, one of the following :
1. return faults in JSON (useful for rest services)
2. return faults in XML (custom tags)
The HTTPInput already handles serialisation of the exceptionList & it'll be great to reuse that, instead of writing that up again.
Any suggestions? _________________ Regards |
|
Back to top |
|
 |
akil |
Posted: Wed Oct 29, 2014 10:29 pm Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
Hi
So here's what I tried,
I added a compute node to the catch terminal of the Input node, parsed the exception list and generated a JSON & sent the reply back via the Reply node.
But when I do that, the message flow is committed, this is documented as well
Quote: |
If you connect the Catch terminal of the input node, you are indicating that the flow handles all the exceptions that are generated anywhere in the out flow. The broker performs no rollback, and takes no action, unless there is an exception on the catch flow. If you want any rollback action after an exception has been raised and caught, you must provide this in the catch flow.
|
How do I rollback from within the catch flow?
( I could use Throw, but that that rollbacks the custom JSON that I just constructed .. )
Any suggestions? _________________ Regards |
|
Back to top |
|
 |
mgk |
Posted: Wed Oct 29, 2014 11:59 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Put the throw node after the reply node - HTTP Replies cannot be rolled back. _________________ 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 |
|
 |
akil |
Posted: Thu Oct 30, 2014 1:14 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
Thank you so much!.
I know now one use of the out terminals on the Reply Node. _________________ Regards |
|
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
|
|
|
|