electric.soap
Class SOAPException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byjava.rmi.RemoteException
                  extended byelectric.soap.SOAPException
All Implemented Interfaces:
IEXMLLoggingConstants, IGLUELoggingConstants, ILoggingConstants, ISOAPConstants, java.io.Serializable
Direct Known Subclasses:
RoutingException, UDDIException

public class SOAPException
extends java.rmi.RemoteException
implements ISOAPConstants, IGLUELoggingConstants

SOAPException represents a SOAP exception.

Author:
webMethods
See Also:
Serialized Form

Field Summary
protected  java.lang.String actor
           
protected  boolean autoRethrow
           
protected  java.lang.Throwable cause
           
static java.lang.String CLIENT
          The code for a client-side fault.
protected  java.lang.String code
           
protected  Element detail
           
static java.lang.String MUST_UNDERSTAND
          The code for a header that was not understood.
static java.lang.String SERVER
          The code for a server-side fault.
static java.lang.String VERSION_MISMATCH
          The code for a version mismatch.
 
Fields inherited from interface electric.soap.ISOAPConstants
ACTOR, ASYNC, BODY, DETAIL, ENCODING_STYLE, ENVELOPE, EXCEPTION, FAULT, FAULT_ACTOR, FAULT_CODE, FAULT_STRING, GET_SOAP_ACTOR, GET_SOAP_CODE, HEADER, NEXT_ACTOR, OPTIMIZED_HEADER, SET_SOAP_ACTOR, SET_SOAP_CODE, SET_SOAP_DETAIL, SOAP_ACTION_HEADER, SOAP_BINDING, SOAP_ENCODING, SOAP_ENCODING_PREFIX, SOAP_ENVELOPE, SOAP_HTTP_TRANSPORT, SOAP_PREFIX, SOAP11_BINDING, SOAP11_ENCODING, SOAP11_ENVELOPE, SOAP12, SOAP12_BINDING, SOAP12_ENCODING, SOAP12_ENVELOPE, SOAP12_HTTP_CONTENT_TYPE, STACKTRACE, TME_PREFIX, UNDERSTOOD, XSD_PREFIX, XSI_PREFIX, XSI_SUFFIX
 
Fields inherited from interface electric.glue.IGLUELoggingConstants
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT
 
Fields inherited from interface electric.xml.IEXMLLoggingConstants
MAPPING_EVENT, SCHEMA_EVENT
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Constructor Summary
SOAPException()
          No-arg constructor required for xml serialization.
SOAPException(Element fault)
          Construct a SOAPException that represents the specified SOAP fault.
SOAPException(java.lang.String message)
          Construct a SOAPException with the specified arguments.
SOAPException(java.lang.String message, java.lang.String code)
          Construct a SOAPException with the specified arguments.
SOAPException(java.lang.String message, java.lang.String code, java.lang.String actor, Element detail)
          Construct a SOAPException with the specified arguments.
SOAPException(java.lang.String message, java.lang.String code, java.lang.String actor, java.lang.String detail)
          Construct a SOAPException with the specified arguments.
SOAPException(java.lang.Throwable throwable)
          Construct a SOAPException that represents the specified exception.
SOAPException(java.lang.Throwable throwable, java.lang.String code)
          Construct a SOAPException that represents the specified exception.
 
Method Summary
 void addFields(Element fault)
          Add my XML representation to the specified fault element.
 java.lang.Throwable forRethrow(java.lang.Class[] types)
          Return an object that represents the original exception, or myself if the original exception is unknown.
 boolean getAutoRethrow()
          Return true if automatic rethrow is enabled.
 java.lang.Throwable getCause()
          Return the original cause of this exception, or null if there was none.
 java.lang.String getSOAPActor()
          Return the fault actor, or null if not present.
 java.lang.String getSOAPCode()
          Return the fault code.
 java.lang.String getSOAPDetail()
          Return the detail as an XML string, or null if not present.
 Element getSOAPDetailElement()
          Return the detail, or null if there is none.
 void setAutoRethrow(boolean flag)
          If set to true, serialize the server-side exception under a detail field so that the exception can be automatically rethrown on the client side.
 void setSOAPActor(java.lang.String actor)
          Set the actor.
 void setSOAPCode(java.lang.String code)
          Set the fault code.
 void setSOAPDetail(java.lang.String detail)
          Set the detail, which must have as its root.
 void setSOAPDetailElement(Element detail)
          Set the detail, which must have as its root.
 java.lang.String toString()
          Return a description of this SOAPException.
 
Methods inherited from class java.rmi.RemoteException
getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLIENT

public static final java.lang.String CLIENT
The code for a client-side fault.

See Also:
Constant Field Values

SERVER

public static final java.lang.String SERVER
The code for a server-side fault.

See Also:
Constant Field Values

MUST_UNDERSTAND

public static final java.lang.String MUST_UNDERSTAND
The code for a header that was not understood.

See Also:
Constant Field Values

VERSION_MISMATCH

public static final java.lang.String VERSION_MISMATCH
The code for a version mismatch.

See Also:
Constant Field Values

code

protected java.lang.String code

actor

protected java.lang.String actor

detail

protected Element detail

cause

protected java.lang.Throwable cause

autoRethrow

protected boolean autoRethrow
Constructor Detail

SOAPException

public SOAPException()
No-arg constructor required for xml serialization. If thrown directly, then soap exceptions will be specially processed, but we need the no-arg construtor if a soap exception is wrapped in another exception.


SOAPException

public SOAPException(java.lang.String message)
Construct a SOAPException with the specified arguments. The actor and detail fields are set to null.

Parameters:
message - Human readable explanation of the fault.

SOAPException

public SOAPException(java.lang.String message,
                     java.lang.String code)
Construct a SOAPException with the specified arguments. The actor and detail fields are set to null.

Parameters:
message - Human readable explanation of the fault.
code - VersionMismatch, MustUnderstand, Client or Server.

SOAPException

public SOAPException(java.lang.String message,
                     java.lang.String code,
                     java.lang.String actor,
                     java.lang.String detail)
Construct a SOAPException with the specified arguments.

Parameters:
message - Human readable explanation of the fault.
code - VersionMismatch, MustUnderstand, Client or Server.
actor - The URI of the fault.
detail - Implementation-specific XML that encodes information about the fault.

SOAPException

public SOAPException(java.lang.String message,
                     java.lang.String code,
                     java.lang.String actor,
                     Element detail)
Construct a SOAPException with the specified arguments.

Parameters:
message - Human readable explanation of the fault.
code - VersionMismatch, MustUnderstand, Client or Server.
actor - The URI of the fault.
detail - Implementation-specific XML that encodes information about the fault.

SOAPException

public SOAPException(java.lang.Throwable throwable)
Construct a SOAPException that represents the specified exception.

Parameters:
throwable - The exception.

SOAPException

public SOAPException(java.lang.Throwable throwable,
                     java.lang.String code)
Construct a SOAPException that represents the specified exception.

Parameters:
throwable - The exception.
code - VersionMismatch, MustUnderstand, Client or Server.

SOAPException

public SOAPException(Element fault)
Construct a SOAPException that represents the specified SOAP fault.

Parameters:
fault - The SOAP fault.
Method Detail

toString

public java.lang.String toString()
Return a description of this SOAPException.


getCause

public java.lang.Throwable getCause()
Return the original cause of this exception, or null if there was none.


getSOAPCode

public java.lang.String getSOAPCode()
Return the fault code.


setSOAPCode

public void setSOAPCode(java.lang.String code)
Set the fault code.

Parameters:
code - The new value.

getSOAPActor

public java.lang.String getSOAPActor()
Return the fault actor, or null if not present.


setSOAPActor

public void setSOAPActor(java.lang.String actor)
Set the actor.

Parameters:
actor - The new value.

getSOAPDetail

public java.lang.String getSOAPDetail()
Return the detail as an XML string, or null if not present.


setSOAPDetail

public void setSOAPDetail(java.lang.String detail)
                   throws ParseException
Set the detail, which must have as its root.

Parameters:
detail - The new value.
Throws:
ParseException

setSOAPDetailElement

public void setSOAPDetailElement(Element detail)
Set the detail, which must have as its root.

Parameters:
detail - The new value.

getSOAPDetailElement

public Element getSOAPDetailElement()
Return the detail, or null if there is none.


setAutoRethrow

public void setAutoRethrow(boolean flag)
If set to true, serialize the server-side exception under a detail field so that the exception can be automatically rethrown on the client side. By default, this is equal to true.

Parameters:
flag - The new value.

getAutoRethrow

public boolean getAutoRethrow()
Return true if automatic rethrow is enabled.


addFields

public void addFields(Element fault)
Add my XML representation to the specified fault element.

Parameters:
fault - The fault element.

forRethrow

public java.lang.Throwable forRethrow(java.lang.Class[] types)
Return an object that represents the original exception, or myself if the original exception is unknown.

Parameters:
types -


copyright© 2001-2004 by webMethods All Rights Reserved.