public abstract class BodyImpl extends ElementImpl implements SOAPBody
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 |
|---|---|
|
BodyImpl(SOAPDocumentImpl ownerDoc,
Element domElement) |
protected |
BodyImpl(SOAPDocumentImpl ownerDoc,
NameImpl bodyName) |
| Modifier and Type | Method and Description |
|---|---|
SOAPBodyElement |
addBodyElement(Name name)
Creates a new
SOAPBodyElement object with the specified
name and adds it to this SOAPBody object. |
SOAPBodyElement |
addBodyElement(QName qname)
Creates a new
SOAPBodyElement object with the specified
QName and adds it to this SOAPBody object. |
SOAPBodyElement |
addDocument(Document document)
Adds the root node of the DOM
to this SOAPBody object. |
protected SOAPElement |
addElement(Name name) |
protected SOAPElement |
addElement(QName name) |
SOAPFault |
addFault()
Creates a new
SOAPFault object and adds it to
this SOAPBody object. |
SOAPFault |
addFault(Name faultCode,
String faultString)
Creates a new
SOAPFault object and adds it to this
SOAPBody object. |
SOAPFault |
addFault(Name faultCode,
String faultString,
Locale locale)
Creates a new
SOAPFault object and adds it to
this SOAPBody object. |
SOAPFault |
addFault(QName faultCode,
String faultString)
Creates a new
SOAPFault object and adds it to this SOAPBody
object. |
SOAPFault |
addFault(QName faultCode,
String faultString,
Locale locale)
Creates a new
SOAPFault object and adds it to this
SOAPBody object. |
protected SOAPElement |
convertToSoapElement(Element element) |
protected abstract SOAPBodyElement |
createBodyElement(Name name) |
protected abstract SOAPBodyElement |
createBodyElement(QName name) |
protected abstract SOAPFault |
createFaultElement() |
Document |
extractContentAsDocument()
Creates a new DOM
and sets
the first child of this SOAPBody as it's document
element. |
protected SOAPElement |
findFault() |
NodeList |
getChildNodes() |
protected abstract QName |
getDefaultFaultCode() |
SOAPFault |
getFault()
Returns the
SOAPFault object in this SOAPBody
object. |
protected abstract NameImpl |
getFaultName(String name) |
Node |
getFirstChild() |
Node |
getFirstChildNoMaterialize() |
Node |
getLastChild() |
boolean |
hasChildNodes() |
boolean |
hasFault()
Indicates whether a
SOAPFault object exists in this
SOAPBody object. |
protected abstract boolean |
isFault(SOAPElement child) |
boolean |
isLazy() |
SOAPElement |
setElementQName(QName newName)
Changes the name of this
Element to newName if
possible. |
void |
setParentElement(SOAPElement element)
Sets the parent of this
Node object to the given
SOAPElement 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, getDomElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFeature, 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, 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, setPrefix, setTextContent, setUserData, setValue, tryToFindEncodingStyleAttributeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAttribute, 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, setValuegetAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected BodyImpl(SOAPDocumentImpl ownerDoc, NameImpl bodyName)
public BodyImpl(SOAPDocumentImpl ownerDoc, Element domElement)
protected abstract boolean isFault(SOAPElement child)
protected abstract SOAPBodyElement createBodyElement(Name name)
protected abstract SOAPBodyElement createBodyElement(QName name)
protected abstract SOAPFault createFaultElement()
protected abstract QName getDefaultFaultCode()
public SOAPFault addFault() throws SOAPException
SOAPBodySOAPFault object and adds it to
this SOAPBody object. The new SOAPFault will
have default values set for the mandatory child elements. The type of
the SOAPFault will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on the protocol specified while creating the
MessageFactory instance.
A SOAPBody may contain at most one SOAPFault
child element.
addFault in interface SOAPBodySOAPFault objectSOAPException - if there is a SOAP errorpublic SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException
SOAPBodySOAPFault object and adds it to
this SOAPBody object. The type of the
SOAPFault will be a SOAP 1.1 or a SOAP 1.2
SOAPFault depending on the protocol
specified while creating the MessageFactory instance.
For SOAP 1.2 the faultCode parameter is the value of the
Fault/Code/Value element and the faultString parameter
is the value of the Fault/Reason/Text element. For SOAP 1.1
the faultCode parameter is the value of the faultcode
element and the faultString parameter is the value of the faultstring
element.
A SOAPBody may contain at most one SOAPFault
child element.
addFault in interface SOAPBodyfaultCode - a Name object giving the fault
code to be set; must be one of the fault codes defined in the Version
of SOAP specification in usefaultString - a String giving an explanation of
the faultlocale - a Locale object indicating
the native language of the faultStringSOAPFault objectSOAPException - if there is a SOAP errorSOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String)public SOAPFault addFault(QName faultCode, String faultString, Locale locale) throws SOAPException
SOAPBodySOAPFault object and adds it to this
SOAPBody object. The type of the SOAPFault
will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on
the protocol specified while creating the MessageFactory
instance.
For SOAP 1.2 the faultCode parameter is the value of the
Fault/Code/Value element and the faultString parameter
is the value of the Fault/Reason/Text element. For SOAP 1.1
the faultCode parameter is the value of the faultcode
element and the faultString parameter is the value of the faultstring
element.
A SOAPBody may contain at most one SOAPFault
child element.
addFault in interface SOAPBodyfaultCode - a QName object giving the fault code to be
set; must be one of the fault codes defined in the version
of SOAP specification in use.faultString - a String giving an explanation of the faultlocale - a Locale object indicating the
native language of the faultStringSOAPFault objectSOAPException - if there is a SOAP errorSOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String),
SOAPBody.addFault(Name faultCode, String faultString, Locale locale)public SOAPFault addFault(Name faultCode, String faultString) throws SOAPException
SOAPBodySOAPFault object and adds it to this
SOAPBody object. The type of the SOAPFault
will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on
the protocol specified while creating the MessageFactory
instance.
For SOAP 1.2 the faultCode parameter is the value of the
Fault/Code/Value element and the faultString parameter
is the value of the Fault/Reason/Text element. For SOAP 1.1
the faultCode parameter is the value of the faultcode
element and the faultString parameter is the value of the faultstring
element.
In case of a SOAP 1.2 fault, the default value for the mandatory xml:lang
attribute on the Fault/Reason/Text element will be set to
java.util.Locale.getDefault()
A SOAPBody may contain at most one SOAPFault
child element.
addFault in interface SOAPBodyfaultCode - a Name object giving the fault code to be set;
must be one of the fault codes defined in the version of SOAP
specification in usefaultString - a String giving an explanation of the faultSOAPFault objectSOAPException - if there is a SOAP errorSOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String)public SOAPFault addFault(QName faultCode, String faultString) throws SOAPException
SOAPBodySOAPFault object and adds it to this SOAPBody
object. The type of the SOAPFault
will be a SOAP 1.1 or a SOAP 1.2 SOAPFault depending on
the protocol specified while creating the MessageFactory
instance.
For SOAP 1.2 the faultCode parameter is the value of the
Fault/Code/Value element and the faultString parameter
is the value of the Fault/Reason/Text element. For SOAP 1.1
the faultCode parameter is the value of the faultcode
element and the faultString parameter is the value of the faultstring
element.
In case of a SOAP 1.2 fault, the default value for the mandatory xml:lang
attribute on the Fault/Reason/Text element will be set to
java.util.Locale.getDefault()
A SOAPBody may contain at most one SOAPFault
child element
addFault in interface SOAPBodyfaultCode - a QName object giving the fault code to be
set; must be one of the fault codes defined in the version
of SOAP specification in usefaultString - a String giving an explanation of the faultSOAPFault objectSOAPException - if there is a SOAP errorSOAPFault.setFaultCode(javax.xml.soap.Name),
SOAPFault.setFaultString(java.lang.String),
SOAPBody.addFault(Name faultCode, String faultString)protected SOAPElement findFault()
public boolean hasFault()
SOAPBodySOAPFault object exists in this
SOAPBody object.public SOAPFault getFault()
SOAPBodySOAPFault object in this SOAPBody
object.public SOAPBodyElement addBodyElement(Name name) throws SOAPException
SOAPBodySOAPBodyElement object with the specified
name and adds it to this SOAPBody object.addBodyElement in interface SOAPBodyname - a Name object with the name for the new SOAPBodyElement
objectSOAPBodyElement objectSOAPException - if a SOAP error occursSOAPBody.addBodyElement(javax.xml.namespace.QName)public SOAPBodyElement addBodyElement(QName qname) throws SOAPException
SOAPBodySOAPBodyElement object with the specified
QName and adds it to this SOAPBody object.addBodyElement in interface SOAPBodyqname - a QName object with the qname for the new
SOAPBodyElement objectSOAPBodyElement objectSOAPException - if a SOAP error occursSOAPBody.addBodyElement(Name)public void setParentElement(SOAPElement element) throws SOAPException
NodeNode object to the given
SOAPElement object.setParentElement in class ElementImplelement - the SOAPElement object to be set as
the parent of this Node objectSOAPException - if there is a problem in setting the
parent to the given elementNode.getParentElement()protected SOAPElement addElement(Name name) throws SOAPException
addElement in class ElementImplSOAPExceptionprotected SOAPElement addElement(QName name) throws SOAPException
addElement in class ElementImplSOAPExceptionpublic SOAPBodyElement addDocument(Document document) throws SOAPException
SOAPBodyDocument
to this SOAPBody object.
Calling this method invalidates the document parameter.
The client application should discard all references to this Document
and its contents upon calling addDocument. The behavior
of an application that continues to use such references is undefined.
addDocument in interface SOAPBodydocument - the Document object whose root node will be
added to this SOAPBody.SOAPBodyElement that represents the root node
that was added.SOAPException - if the Document cannot be addedprotected SOAPElement convertToSoapElement(Element element)
convertToSoapElement in class ElementImplpublic 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.public Document extractContentAsDocument() throws SOAPException
SOAPBodyDocument and sets
the first child of this SOAPBody as it's document
element. The child SOAPElement is removed as part of the
process.extractContentAsDocument in interface SOAPBodyDocument representation
of the SOAPBody content.SOAPException - if there is not exactly one child SOAPElement of the
SOAPBody.public boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class ElementImplpublic NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class ElementImplpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class ElementImplpublic Node getFirstChildNoMaterialize()
public Node getLastChild()
getLastChild in interface NodegetLastChild in class ElementImplpublic boolean isLazy()
Copyright © 2019 JBoss by Red Hat. All rights reserved.