org.apache.muse.ws.resource.basefaults
Class BaseFault

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.muse.ws.addressing.soap.SoapFault
              extended by org.apache.muse.ws.resource.basefaults.BaseFault
All Implemented Interfaces:
Serializable, XmlSerializable
Direct Known Subclasses:
AddRefusedFault, ContentCreationFailedFault, InvalidFilterFault, InvalidMessageContentExpressionFault, InvalidMessageFormatFault, InvalidModificationFault, InvalidProducerPropertiesExpressionFault, InvalidQueryExpressionFault, InvalidResourcePropertyQNameFault, InvalidTopicExpressionFault, MetadataValidationFault, MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault, NotifyMessageNotSupportedFault, PauseFailedFault, QueryEvaluationErrorFault, RelationshipCreationFailedFault, ResourceInitializationFault, ResourceNotDestroyedFault, ResourceUnavailableFault, ResourceUnknownFault, ResumeFailedFault, SchemaValidationFault, SerializationErrorFault, SetResourcePropertyRequestFailedFault, SubscribeCreationFailedFault, TerminationTimeChangeRejectedFault, TopicExpressionDialectUnknownFault, TopicNotSupportedFault, UnableToCreatePullPointFault, UnableToGetMessagesFault, UnableToModifyResourcePropertyFault, UnableToPutResourcePropertyDocumentFault, UnableToSetTerminationTimeFault, UnacceptableInitialTerminationTimeFault, UnknownQueryExpressionDialectFault, UnrecognizedPolicyRequestFault, UnsupportedMemberInterfaceFault, UnsupportedPolicyRequestFault

public abstract class BaseFault
extends SoapFault

BaseFault is Muse's default implementation of the WS-BaseFaults BaseFault type. This can be used as a standalone class or (more commonly) as a base class for more concrete fault types. WS-BF XML parsing and serialization is also handled by this class.

Author:
Dan Jemiolo (danj)
See Also:
Serialized Form

Constructor Summary
BaseFault(Element xml)
          Creates a new BaseFault by parsing the given XML according to the WS-BF spec.
BaseFault(QName name, String message)
           
BaseFault(QName name, String message, Throwable cause)
           
BaseFault(QName name, Throwable cause)
           
 
Method Summary
 String getDescription()
           
 Element getDetail()
          Creates the WSBF BaseFault XML on-the-fly, for inclusion in a larger SOAPFault XML fragment.
 Element getErrorCode()
           
 String getErrorCodeDialect()
           
 QName getName()
           
 EndpointReference getOriginReference()
           
 Date getTimestamp()
           
 void setErrorCode(Element errorCode, String errorCodeDialect)
           
 void setOriginReference(EndpointReference origin)
           
 
Methods inherited from class org.apache.muse.ws.addressing.soap.SoapFault
getCode, getMessage, getNodeURI, getReason, getRoleURI, getSubCode, setCode, setDetail, setNodeURI, setReason, setRoleURI, setSubCode, toXML, toXML
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseFault

public BaseFault(Element xml)
Creates a new BaseFault by parsing the given XML according to the WS-BF spec. This constructor only checks for elements and values defined in WS-BF and does not fail if extensions are added to the fault type.

The timestamp for this fault is the one specified in the XML, regardless of when this object is created.

Parameters:
xml - The XML representation of a WS-BF BaseFault.

BaseFault

public BaseFault(QName name,
                 String message)

BaseFault

public BaseFault(QName name,
                 String message,
                 Throwable cause)

BaseFault

public BaseFault(QName name,
                 Throwable cause)
Method Detail

getDetail

public Element getDetail()
Creates the WSBF BaseFault XML on-the-fly, for inclusion in a larger SOAPFault XML fragment. The wsrf-bf:Description is not included because the same text is found in the SOAPFault's Reason element.

Overrides:
getDetail in class SoapFault

getDescription

public String getDescription()

getErrorCode

public Element getErrorCode()

getErrorCodeDialect

public String getErrorCodeDialect()

getName

public QName getName()

getOriginReference

public EndpointReference getOriginReference()

getTimestamp

public Date getTimestamp()

setErrorCode

public void setErrorCode(Element errorCode,
                         String errorCodeDialect)

setOriginReference

public void setOriginReference(EndpointReference origin)


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.