tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Harrelson" <>
Subject RE: Handling SOAP faults
Date Fri, 16 Apr 2004 17:58:53 GMT
What the SOAP spec says is that a SOAPfault XML document 
needs to be returned in the errorStream and a response code of 
500 returned.

Sending a response 500 is easy, including a response message is 
also easy.  But, what is included in the response message is not 
written to the errorStream.  Tomcat seems to write whatever is 
generated by the error-page directive in the deployment descriptor 
to the error-stream, so I have currently solved the problem by 
passing the SOAPfault document through the session variable to 
the designated jsp listed in the error-page directive.

It just seems that this is a hackery way to do it, and my servlet 
should be able to write directly to the errorStream of the response, I 
just can't see how.

Any assistance is appreciated.



Send reply to:      "Tomcat Users List" <>
From:               "Yansheng Lin" <>
To:                 "'Tomcat Users List'" <>
Subject:            RE: Handling SOAP faults
Date sent:          Fri, 16 Apr 2004 11:21:06 -0600

> How about setting the fault on the response?  With 500 as status.  Or is
> that what you asked for?
> -Yan
> -----Original Message-----
> From: Bill Harrelson [] 
> Sent: April 15, 2004 19:04
> To: Tomcat Users List
> Subject: Handling SOAP faults
> Hello,
> I'm using Tomcat 4.2.14, JDK 1.4.1, and I need to be able to return 
> a SOAP fault document with a response code of 500.  The only 
> way I've found to do this seems a bit of a hack, and I was 
> wondering if there was a better way.
> Currently I'm passing the SOAP fault document in the session 
> variable which gets picked up by the error-page handler (a jsp) 
> when I issue the sendError(500).  This results in the SOAPfault 
> message appearing in the error-stream on the client as it should, it 
> just seems as though I ought to be able to write to the error-stream 
> directly, but I can't find how  in the doc, or googling.
> Can anyone assist?
> Thanks,
> Bill
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message