public abstract class SOAPFaultBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
captureStackTrace
Set to false if you don't want the generated faults to have stack trace in it.
|
Constructor and Description |
---|
SOAPFaultBuilder() |
Modifier and Type | Method and Description |
---|---|
static SOAPFaultBuilder |
create(com.sun.xml.ws.api.message.Message msg)
Parses a fault
Message and returns it as a SOAPFaultBuilder . |
Throwable |
createException(Map<QName,CheckedExceptionImpl> exceptions)
This should be called from the client side to throw an
Exception for a given soap mesage |
static com.sun.xml.ws.api.message.Message |
createSOAPFaultMessage(SOAPVersion soapVersion,
CheckedExceptionImpl ceModel,
Throwable ex)
To be called by the server runtime in the situations when there is an Exception that needs to be transformed in
to a soapenv:Fault payload.
|
static com.sun.xml.ws.api.message.Message |
createSOAPFaultMessage(SOAPVersion soapVersion,
CheckedExceptionImpl ceModel,
Throwable ex,
QName faultCode)
Create the Message with the specified faultCode
|
static com.sun.xml.ws.api.message.Message |
createSOAPFaultMessage(SOAPVersion soapVersion,
ProtocolException ex,
QName faultcode)
|
static com.sun.xml.ws.api.message.Message |
createSOAPFaultMessage(SOAPVersion soapVersion,
SOAPFault fault) |
static com.sun.xml.ws.api.message.Message |
createSOAPFaultMessage(SOAPVersion soapVersion,
String faultString,
QName faultCode)
Server runtime will call this when there is some internal error not resulting from an exception.
|
QName |
getFirstDetailEntryName() |
protected abstract Throwable |
getProtocolException() |
public static final boolean captureStackTrace
@Nullable public QName getFirstDetailEntryName()
public Throwable createException(Map<QName,CheckedExceptionImpl> exceptions) throws JAXBException
Exception
for a given soap mesageJAXBException
@NotNull public static com.sun.xml.ws.api.message.Message createSOAPFaultMessage(@NotNull SOAPVersion soapVersion, @NotNull ProtocolException ex, @Nullable QName faultcode)
soapVersion
- SOAPVersion.SOAP_11
or SOAPVersion.SOAP_12
ex
- a ProtocolExceptionfaultcode
- soap faultcode. Its ignored if the ProtocolException
instance is SOAPFaultException
and it has a
faultcode present in the underlying SOAPFault
.Message
representing SOAP faultpublic static com.sun.xml.ws.api.message.Message createSOAPFaultMessage(SOAPVersion soapVersion, CheckedExceptionImpl ceModel, Throwable ex)
ceModel
- CheckedExceptionImpl
model that provides useful informations such as the detail tagname
and the Exception associated with it. Caller of this constructor should get the CheckedException
model by calling JavaMethodImpl.getCheckedException(Class)
, where
Class is t.getClass().
If its null then this is not a checked exception and in that case the soap fault will be serialized only from the exception as described below.
ex
- Exception that needs to be translated into soapenv:Fault, always non-null.
SOAPFaultException
then its serilaized as protocol exception.
SOAPFaultException
and t is a checked exception then
the soap fault detail is serilaized from t and the fault actor/string/role is taken from t.getCause().
soapVersion
- non-nullpublic static com.sun.xml.ws.api.message.Message createSOAPFaultMessage(SOAPVersion soapVersion, CheckedExceptionImpl ceModel, Throwable ex, QName faultCode)
public static com.sun.xml.ws.api.message.Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode)
soapVersion
- SOAPVersion.SOAP_11
or SOAPVersion.SOAP_12
faultString
- must be non-nullfaultCode
- For SOAP 1.1, it must be one of
For SOAP 1.2
Message
public static com.sun.xml.ws.api.message.Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault)
protected abstract Throwable getProtocolException()
public static SOAPFaultBuilder create(com.sun.xml.ws.api.message.Message msg) throws JAXBException
Message
and returns it as a SOAPFaultBuilder
.JAXBException
- if the parsing fails.Copyright © 2015 Oracle Corporation. All rights reserved.