Author |
Message
|
dominik.schweers |
Posted: Thu Oct 23, 2008 5:55 am Post subject: Customized SOAP fault message |
|
|
Novice
Joined: 23 Oct 2008 Posts: 17
|
Hi Guys,
we are using a message flow to provide a web service.
We use the HTTP Input und and HTTP Reply Nodes encapsulated
in Subflows and the SOAP Envelope and Extract Nodes (via Support Pack IA90, because we are on Broker 6.0). Everything works fine, except the Error handling.
We want to provide some additional/customized information in the SOAP fault part.
Is it possible to change the standard fault message generated by the HTTP Input Node when it catches a exception?
I tried to generate my own fault message and send it via HTTP Reply node. This works on the broker side, but the client (Java classes generated by Axis 1.3) crashes because it expects a non-error response.
Is it generally possible to send a fault message via HTTP Reply?
Any experience or suggestions?
Thanks in advance |
|
Back to top |
|
 |
mgk |
Posted: Thu Oct 23, 2008 6:03 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi.
Yes you can send a SOAPFault message with an HTTPReply node, but you will also need to set the ReplyStatusCode in the LocalEnvrionment to 500 as otherwise the Fault message will be sent with a 200 OK response code.
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 |
|
 |
dominik.schweers |
Posted: Thu Oct 23, 2008 6:11 am Post subject: |
|
|
Novice
Joined: 23 Oct 2008 Posts: 17
|
MGK you are right, Axis tries to parse the response as correct response because the HTTP Code is 200.
I thought of this some time ago, but it did not work, because i tried to set the HTTP Code in the HTTPReply Header of the message.
Where did you find the information how to set the HTTP Code in the local environment? I do not find it in the docs (or Iam searching the wrong place).
Thank you very much for your help!  |
|
Back to top |
|
 |
mgk |
Posted: Thu Oct 23, 2008 7:35 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
No problem, it is not the easiest thing to find. The location is:
Code: |
LocalEnvrionment.Destination.HTTP.ReplyStatusCode |
and it is documented in the infocentre under topic ac20450
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 |
|
 |
dominik.schweers |
Posted: Fri Oct 24, 2008 5:35 am Post subject: |
|
|
Novice
Joined: 23 Oct 2008 Posts: 17
|
Hi,
thanks for your help. I managed to create my own Fault Message and send it. Axis Client and Broker with HTTP Request Node recognise this as a Error Message.
Not its getting tricky. We have a standard project, where our standard error format is located. Now i want to use this message definition for the fault details part. I can create such a message and send it, but I can not define this message in the message category as soap:fault. I can not select messages outside the same message set in the message category editor. But without this entry in the message category the WSDL does not contain the fault format.
Is there any way to achieve this? |
|
Back to top |
|
 |
broker_new |
Posted: Tue Nov 18, 2008 5:43 pm Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 18, 2008 8:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dominik.schweers wrote: |
Hi,
thanks for your help. I managed to create my own Fault Message and send it. Axis Client and Broker with HTTP Request Node recognise this as a Error Message.
Not its getting tricky. We have a standard project, where our standard error format is located. Now i want to use this message definition for the fault details part. I can create such a message and send it, but I can not define this message in the message category as soap:fault. I can not select messages outside the same message set in the message category editor. But without this entry in the message category the WSDL does not contain the fault format.
Is there any way to achieve this? |
Does your project reference the message set you are trying to use? Is that message set also deployed to the same eg?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|