org.jibx.ws.io.handler
Class ExceptionWriter

java.lang.Object
  extended by org.jibx.ws.io.handler.ExceptionWriter
All Implemented Interfaces:
OutHandler

public final class ExceptionWriter
extends Object
implements OutHandler

Writes an exception as an XML element.


Constructor Summary
ExceptionWriter(Throwable t, boolean includeStackTrace)
          Writes an exception as an XML element, with an element name of <Exception>.
 
Method Summary
 void invoke(OutContext context, IXMLWriter xmlWriter)
          Writes the throwable to the xmlWriter, wrapped in an <Exception> element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionWriter

public ExceptionWriter(Throwable t,
                       boolean includeStackTrace)
Writes an exception as an XML element, with an element name of <Exception>.

Parameters:
t - the exception to write
includeStackTrace - true if a stack trace should be included in the XML.
Method Detail

invoke

public void invoke(OutContext context,
                   IXMLWriter xmlWriter)
            throws IOException,
                   WsException
Writes the throwable to the xmlWriter, wrapped in an <Exception> element. Invokes the handler.

Specified by:
invoke in interface OutHandler
Parameters:
context - the context of the current message being sent
xmlWriter - a writer for the XML message positioned at the start of the XML content for which the handler is configured
Throws:
IOException - on I/O error writing the XML content
WsException - on errors other than I/O errors


Project Web Site