EbxmlValidationException

public class EbxmlValidationException extends ValidationException

Exception class that can generate ebXML error messages from the information it has been given.

Author:Frankie Lam

Fields

ACTION

public static final String ACTION

Error action reserved for standalone errors described in ebXML Message Service Specification [ebMSS 4.2.4.3].

EBXML_ERROR_DELIVERY_FAILURE

public static final String EBXML_ERROR_DELIVERY_FAILURE

ebXML message cannot be delivered.

EBXML_ERROR_INCONSISTENT

public static final String EBXML_ERROR_INCONSISTENT

ebXML error indicating that the ebXML message is inconsistent.

EBXML_ERROR_MIME_PROBLEM

public static final String EBXML_ERROR_MIME_PROBLEM

xlink:href error cannot be resolved.

EBXML_ERROR_NOT_SUPPORTED

public static final String EBXML_ERROR_NOT_SUPPORTED

ebXML error indicating that the function is not supported.

EBXML_ERROR_OTHER_XML

public static final String EBXML_ERROR_OTHER_XML

ebXML error indicating that the ebXML message do not conform to the rules or constraints specified in the specification, and cannot be represented using other error codes.

EBXML_ERROR_SECURITY_FAILURE

public static final String EBXML_ERROR_SECURITY_FAILURE

Validation of signatures or authenticity / authority has failed.

EBXML_ERROR_TIME_TO_LIVE_EXPIRED

public static final String EBXML_ERROR_TIME_TO_LIVE_EXPIRED

ebXML message is expired.

EBXML_ERROR_UNKNOWN

public static final String EBXML_ERROR_UNKNOWN

An error has occurred but cannot be represented by other error codes.

EBXML_ERROR_VALUE_NOT_RECOGNIZED

public static final String EBXML_ERROR_VALUE_NOT_RECOGNIZED

ebXML error indicating that the value of an element / attribute cannot be recognized.

SERVICE

public static final String SERVICE

Service name reserved for services described in ebXML Message Service Specification [ebMSS 3.1.4].

SEVERITY_ERROR

public static final String SEVERITY_ERROR

Error severity level

SEVERITY_WARNING

public static final String SEVERITY_WARNING

Warning severity level

location

protected final String location

location of the message containing the error.

refToMessage

protected EbxmlMessage refToMessage

The ebXML message being referred to.

severity

protected final String severity

Severity of the error.

Constructors

EbxmlValidationException

public EbxmlValidationException(String errorCode, String severity, String errorString)

Constructs a EbxmlValidationException object given its error code, severity level, error string and the ebXML message being referred.

Parameters:
  • errorCode – One of the error codes defined in ebMS 4.2.3.4.1.
  • severity – Severity level of the error, which should be either SEVERITY_WARNING or SEVERITY_ERROR
  • errorString – String describing the error.

EbxmlValidationException

public EbxmlValidationException(String errorCode, String severity, String errorString, String location)

Constructs a EbxmlValidationException object given its error code, severity level, error string and the ebXML message being referred.

Parameters:
  • errorCode – One of the error codes defined in ebMS 4.2.3.4.1.
  • severity – Severity level of the error, which should be either SEVERITY_WARNING or SEVERITY_ERROR
  • errorString – String describing the error.
  • location – Location of the message containing the error.

Methods

getEbxmlMessage

public EbxmlMessage getEbxmlMessage()

Get EbxmlMessage error message from the information given int this object.

Returns:EbxmlMessage containing the error information.

getLocation

public String getLocation()

Get the location attribute of the ebXML error element.

Returns:Value of location attribute; null if it is unspecified.

getSOAPMessage

public SOAPMessage getSOAPMessage()

Get the error message in SOAP format.

Returns:javax.xml.soap.SOAPMessage object.

setRefToMessage

public void setRefToMessage(EbxmlMessage refToMessage)

Set the EbxmlMessage being referred to by the error message.

Parameters:
  • refToMessageEbxmlMessage object to be referred to.