public abstract class FaultImpl extends ElementImpl implements SOAPFault
| Modifier and Type | Field and Description |
|---|---|
protected Detail |
detail |
protected SOAPFaultElement |
faultActorElement |
protected SOAPFaultElement |
faultCodeElement |
protected SOAPFaultElement |
faultStringElement |
DSIG_NS, elementQName, log, WSU_NS, XENC_NS, XML_URI, XMLNS_URIATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Modifier | Constructor and Description |
|---|---|
|
FaultImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
protected |
FaultImpl(SOAPDocumentImpl ownerDoc,
NameImpl name) |
| Modifier and Type | Method and Description |
|---|---|
Detail |
addDetail()
Creates an optional
Detail object and sets it as the
Detail object for this SOAPFault
object. |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
protected SOAPFaultElement |
addFaultCodeElement() |
protected FaultElementImpl |
addSOAPFaultElement(String localName) |
protected abstract void |
checkIfStandardFaultCode(String faultCode,
String uri) |
protected static QName |
convertCodeToQName(String code,
SOAPElement codeContainingElement) |
protected SOAPElement |
convertToSoapElement(Element element) |
protected abstract DetailImpl |
createDetail() |
protected abstract FaultElementImpl |
createSOAPFaultElement(Name qname) |
protected abstract FaultElementImpl |
createSOAPFaultElement(QName qname) |
protected abstract FaultElementImpl |
createSOAPFaultElement(String localName) |
protected abstract void |
finallySetFaultCode(String faultcode) |
protected void |
findFaultActorElement() |
protected void |
findFaultCodeElement() |
protected void |
findFaultStringElement() |
protected abstract QName |
getDefaultFaultCode() |
Detail |
getDetail()
Returns the optional detail element for this
SOAPFault
object. |
protected abstract NameImpl |
getDetailName() |
String |
getFaultActor()
Gets the fault actor for this
SOAPFault object. |
protected abstract NameImpl |
getFaultActorName() |
protected abstract NameImpl |
getFaultCodeName() |
protected abstract NameImpl |
getFaultStringName() |
boolean |
hasDetail()
Returns true if this
SOAPFault has a Detail
subelement and false otherwise. |
protected void |
initializeDetail() |
protected abstract boolean |
isStandardFaultElement(String localName) |
protected static String |
localeToXmlLang(Locale locale) |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
abstract void |
setFaultActor(String faultActor)
Sets this
SOAPFault object with the given fault actor. |
void |
setFaultCode(Name faultCodeQName)
Sets this
SOAPFault object with the given fault code. |
void |
setFaultCode(QName faultCodeQName)
Sets this
SOAPFault object with the given fault code. |
void |
setFaultCode(String faultCode)
Sets this
SOAPFault object with the give fault code. |
void |
setFaultCode(String faultCode,
String prefix,
String uri) |
protected static Locale |
xmlLangToLocale(String xmlLang)
Convert an xml:lang attribute value into a Locale object
|
addAttribute, addAttribute, addCDATA, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addNode, addText, addTextNode, appendChild, cloneNode, compareDocumentPosition, convertToSoapText, createElement, createElement, createQName, detachNode, doGetNamespacePrefixes, ensureNamespaceIsDeclared, findAndConvertChildElement, findChild, findEncodingStyleAttributeName, getAllAttributes, getAllAttributesAsQNames, getAllAttributesFrom, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getAttributeValueFrom, getBaseURI, getChildElementNodes, getChildElements, getChildElements, getChildElements, getChildElementsFrom, getChildNodes, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, getFirstChild, getLastChild, getLocalName, getLocalPart, getNamespaceAttr, getNamespaceAttrFrom, getNamespaceContextNodes, getNamespaceContextNodes, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPrefix, getPreviousSibling, getQualifiedName, getSchemaTypeInfo, getSoapDocument, getSOAPNamespace, getTagName, getTextContent, getUserData, getValue, getValueNode, getValueNodeStrict, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, importElement, insertBefore, isDefaultNamespace, isEqualNode, isNamespaceQualified, isNamespaceQualified, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, replaceChild, replaceElementWithSOAPElement, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setEncodingStyleNamespace, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setParentElement, setPrefix, setTextContent, setUserData, setValue, tryToFindEncodingStyleAttributeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFaultReasonText, appendFaultSubcode, getFaultCode, getFaultCodeAsName, getFaultCodeAsQName, getFaultNode, getFaultReasonLocales, getFaultReasonText, getFaultReasonTexts, getFaultRole, getFaultString, getFaultStringLocale, getFaultSubcodes, removeAllFaultSubcodes, setFaultNode, setFaultRole, setFaultString, setFaultStringaddAttribute, addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyledetachNode, getParentElement, getValue, recycleNode, setParentElement, setValuegetAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected SOAPFaultElement faultStringElement
protected SOAPFaultElement faultActorElement
protected SOAPFaultElement faultCodeElement
protected Detail detail
protected FaultImpl(SOAPDocumentImpl ownerDoc, NameImpl name)
public FaultImpl(SOAPDocumentImpl ownerDoc, Element domElement)
protected abstract NameImpl getDetailName()
protected abstract NameImpl getFaultCodeName()
protected abstract NameImpl getFaultStringName()
protected abstract NameImpl getFaultActorName()
protected abstract DetailImpl createDetail()
protected abstract FaultElementImpl createSOAPFaultElement(String localName)
protected abstract FaultElementImpl createSOAPFaultElement(QName qname)
protected abstract FaultElementImpl createSOAPFaultElement(Name qname)
protected abstract void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException
SOAPExceptionprotected abstract void finallySetFaultCode(String faultcode) throws SOAPException
SOAPExceptionprotected abstract boolean isStandardFaultElement(String localName)
protected abstract QName getDefaultFaultCode()
protected void findFaultCodeElement()
protected void findFaultActorElement()
protected void findFaultStringElement()
public void setFaultCode(String faultCode) throws SOAPException
SOAPFaultSOAPFault object with the give fault code.
Fault codes, which given information about the fault, are defined in
the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
Because the fault code is required to be a QName it is preferable to
use the SOAPFault.setFaultCode(Name) form of this method.
setFaultCode in interface SOAPFaultfaultCode - a String giving the fault code to be set.
It must be of the form "prefix:localName" where the prefix has
been defined in a namespace declaration.SOAPException - if there was an error in adding the
faultCode to the underlying XML tree.SOAPFault.setFaultCode(Name),
SOAPFault.getFaultCode(),
SOAPElement.addNamespaceDeclaration(java.lang.String, java.lang.String)public void setFaultCode(String faultCode, String prefix, String uri) throws SOAPException
SOAPExceptionpublic void setFaultCode(Name faultCodeQName) throws SOAPException
SOAPFaultSOAPFault object with the given fault code.
Fault codes, which give information about the fault, are defined
in the SOAP 1.1 specification. A fault code is mandatory and must
be of type Name. This method provides a convenient
way to set a fault code. For example,
SOAPEnvelope se = ...;
// Create a qualified name in the SOAP namespace with a localName
// of "Client". Note that prefix parameter is optional and is null
// here which causes the implementation to use an appropriate prefix.
Name qname = se.createName("Client", null,
SOAPConstants.URI_NS_SOAP_ENVELOPE);
SOAPFault fault = ...;
fault.setFaultCode(qname);
It is preferable to use this method over SOAPFault.setFaultCode(String).setFaultCode in interface SOAPFaultfaultCodeQName - a Name object giving the fault
code to be set. It must be namespace qualified.SOAPException - if there was an error in adding the
faultcode element to the underlying XML tree.SOAPFault.getFaultCodeAsName()public void setFaultCode(QName faultCodeQName) throws SOAPException
SOAPFaultSOAPFault object with the given fault code.
It is preferable to use this method over SOAPFault.setFaultCode(Name).setFaultCode in interface SOAPFaultfaultCodeQName - a QName object giving the fault
code to be set. It must be namespace qualified.SOAPException - if there was an error in adding the
faultcode element to the underlying XML tree.SOAPFault.getFaultCodeAsQName(),
SOAPFault.setFaultCode(Name),
SOAPFault.getFaultCodeAsQName()protected static QName convertCodeToQName(String code, SOAPElement codeContainingElement)
protected void initializeDetail()
public Detail getDetail()
SOAPFaultSOAPFault
object.
A Detail object carries application-specific error
information, the scope of the error information is restricted to
faults in the SOAPBodyElement objects if this is a
SOAP 1.1 Fault.
public Detail addDetail() throws SOAPException
SOAPFaultDetail object and sets it as the
Detail object for this SOAPFault
object.
It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.
addDetail in interface SOAPFaultDetail objectSOAPException - if this
SOAPFault object already contains a
valid Detail objectpublic boolean hasDetail()
SOAPFaultSOAPFault has a Detail
subelement and false otherwise. Equivalent to
(getDetail()!=null).public abstract void setFaultActor(String faultActor) throws SOAPException
SOAPFaultSOAPFault object with the given fault actor.
The fault actor is the recipient in the message path who caused the fault to happen.
If this SOAPFault supports SOAP 1.2 then this call is
equivalent to SOAPFault.setFaultRole(String)
setFaultActor in interface SOAPFaultfaultActor - a String identifying the actor that
caused this SOAPFault objectSOAPException - if there was an error in adding the
faultActor to the underlying XML tree.SOAPFault.getFaultActor()public String getFaultActor()
SOAPFaultSOAPFault object.
If this SOAPFault supports SOAP 1.2 then this call is
equivalent to SOAPFault.getFaultRole()
getFaultActor in interface SOAPFaultString giving the actor in the message path
that caused this SOAPFault objectSOAPFault.setFaultActor(java.lang.String)public SOAPElement setElementQName(QName newName) throws SOAPException
SOAPElementElement to newName if
possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
etc. cannot have their names changed using this method. Any attempt to do
so will result in a SOAPException being thrown.
Callers should not rely on the element instance being renamed as is.
Implementations could end up copying the content of the
SOAPElement to a renamed instance.
setElementQName in interface SOAPElementsetElementQName in class ElementImplnewName - the new name for the Element.SOAPException - if changing the name of this Element
is not allowed.protected SOAPElement convertToSoapElement(Element element)
convertToSoapElement in class ElementImplprotected SOAPFaultElement addFaultCodeElement() throws SOAPException
SOAPExceptionprotected SOAPElement addElement(Name name) throws SOAPException
addElement in class ElementImplSOAPExceptionprotected SOAPElement addElement(QName name) throws SOAPException
addElement in class ElementImplSOAPExceptionprotected FaultElementImpl addSOAPFaultElement(String localName) throws SOAPException
SOAPExceptionprotected static Locale xmlLangToLocale(String xmlLang)
xmlLang - xml:lang attribute valueCopyright © 2019 JBoss by Red Hat. All rights reserved.