public class SOAPBodyImpl extends SOAPElementImpl implements SOAPBody
element
parentElement
builder, done, factory, FIRSTCHILD, flags, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
ATTRIBUTE_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
Constructor and Description |
---|
SOAPBodyImpl(org.apache.axiom.soap.SOAPBody omSOAPBody) |
Modifier and Type | Method and Description |
---|---|
SOAPElement |
addAttribute(QName qname,
String value) |
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 name and adds it to this
SOAPBody object. |
SOAPElement |
addChildElement(QName qname) |
SOAPElement |
addChildElement(SOAPElement soapElement) |
SOAPElement |
addChildElement(String localName) |
SOAPElement |
addChildElement(String localName,
String prefix) |
SOAPElement |
addChildElement(String localName,
String prefix,
String uri) |
SOAPBodyElement |
addDocument(Document document)
Adds the root node of the DOM
Document to this SOAPBody object. |
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) |
SOAPFault |
addFault(QName faultCode,
String faultString,
Locale locale)
Creates a new
SOAPFault object and adds it to this SOAPBody object. |
SOAPElement |
addTextNode(String text)
Creates a new
Text object initialized with the given String and
adds it to this SOAPElement object. |
protected Element |
appendElement(org.apache.axiom.om.impl.dom.ElementImpl child) |
QName |
createQName(String localName,
String prefix)
Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the
context of this SOAPElement.
|
org.apache.axiom.om.OMNode |
detach() |
void |
detachNode()
Removes this
Node object from the tree. |
Document |
extractContentAsDocument()
Creates a new DOM org.w3c.dom.Document and sets the first child of this SOAPBody as its
document element.
|
Iterator |
getAllAttributesAsQNames() |
String |
getAttributeValue(QName qname) |
Iterator |
getChildElements()
Returns an iterator over all the immediate content of this element.
|
Iterator |
getChildElements(Name name) |
Iterator |
getChildElements(QName qname) |
QName |
getElementQName() |
SOAPFault |
getFault()
Returns the
SOAPFault object in this SOAPBody object. |
boolean |
hasFault()
Indicates whether a
SOAPFault object exists in this SOAPBody
object. |
boolean |
removeAttribute(QName qname) |
SOAPElement |
setElementQName(QName qname) |
addAttribute, addChildElement, addNamespaceDeclaration, appendChild, appendText, clone, copyContents, discard, getAllAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getChildNodes, getElement, getElementName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChild, getLastChild, getLocalName, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTagName, getTextContent, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasChildNodes, internalSerialize, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setParent, setParentElement, setValue, toString
getParent, getSchemaTypeInfo, getType, recycleNode, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setType
build, buildWithAttachments, cloneNode, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNextOMSibling, getNextOMSiblingIfAvailable, getNodeValue, getOMFactory, getPreviousOMSibling, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttribute, addChildElement, addNamespaceDeclaration, getAllAttributes, getAttributeValue, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
getParentElement, getValue, recycleNode, setParentElement, setValue
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
appendChild, 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, setUserData
public SOAPBodyImpl(org.apache.axiom.soap.SOAPBody omSOAPBody)
omSOAPBody
- public SOAPElement addChildElement(String localName) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
SOAPException
public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
SOAPException
protected Element appendElement(org.apache.axiom.om.impl.dom.ElementImpl child) throws SOAPException
appendElement
in class SOAPElementImpl
SOAPException
public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
SOAPException
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
SOAPException
public SOAPFault addFault() throws SOAPException
SOAPFault
object and adds it to this SOAPBody
object.addFault
in interface SOAPBody
SOAPFault
objectSOAPException
- if there is a SOAP errorpublic boolean hasFault()
SOAPFault
object exists in this SOAPBody
object.public SOAPFault getFault()
SOAPFault
object in this SOAPBody
object.public SOAPBodyElement addBodyElement(Name name) throws SOAPException
SOAPBodyElement
object with the specified name and adds it to this
SOAPBody
object.addBodyElement
in interface SOAPBody
name
- a Name
object with the name for the new SOAPBodyElement
objectSOAPBodyElement
objectSOAPException
- if a SOAP error occurspublic SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException
SOAPFault
object and adds it to this SOAPBody
object.
The new SOAPFault
will have a faultcode
element that is set to the
faultCode
parameter and a faultstring
set to
faultstring
and localized to locale
.addFault
in interface SOAPBody
faultCode
- a Name
object giving the fault code to be set; must be one of
the fault codes defined in the SOAP 1.1 specification and of type QNamefaultString
- a String
giving an explanation of the faultlocale
- a Locale
object indicating the native language of the
SOAPFault
objectSOAPException
- if there is a SOAP errorpublic SOAPFault addFault(Name faultCode, String faultString) throws SOAPException
SOAPFault
object and adds it to this SOAPBody
object.
The new SOAPFault
will have a faultcode
element that is set to the
faultCode
parameter and a faultstring
set to
faultstring
.addFault
in interface SOAPBody
faultCode
- a Name
object giving the fault code to be set; must be one of
the fault codes defined in the SOAP 1.1 specification and of type QNamefaultString
- a String
giving an explanation of the faultSOAPFault
objectSOAPException
- if there is a SOAP errorpublic SOAPBodyElement addDocument(Document document) throws SOAPException
Document
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 SOAPBody
document
- the Document
object whose root node will be added to this
SOAPBody
SOAPBodyElement
that represents the root node that was addedSOAPException
- if the Document
cannot be addedpublic SOAPBodyElement addBodyElement(QName qname) throws SOAPException
SOAPBodyElement
object with the specified name and adds it to this
SOAPBody
object.addBodyElement
in interface SOAPBody
qname
- a QName
object with the name for the new SOAPBodyElement
objectSOAPBodyElement
objectSOAPException
- if a SOAP error occurspublic SOAPFault addFault(QName faultcode, String faultString) throws SOAPException
addFault
in interface SOAPBody
SOAPException
public SOAPFault addFault(QName faultCode, String faultString, Locale locale) throws SOAPException
SOAPFault
object and adds it to this SOAPBody
object.
The new SOAPFault
will have a faultcode
element that is set to the
faultCode
parameter and a faultstring
set to
faultstring
and localized to locale
.addFault
in interface SOAPBody
faultCode
- a QName
object giving the fault code to befaultString
- a String
giving an explanation of the faultlocale
- a Locale
object indicating the native language of the
SOAPFault
objectSOAPException
- if there is a SOAP errorpublic Document extractContentAsDocument() throws SOAPException
extractContentAsDocument
in interface SOAPBody
SOAPException
- - if there is not exactly one child SOAPElement of the SOAPBody.public void detachNode()
NodeImplEx
Node
object from the tree. Once removed, this node can be garbage
collected if there are no application references to it.detachNode
in class SOAPElementImpl
public org.apache.axiom.om.OMNode detach()
detach
in interface org.apache.axiom.om.OMNode
detach
in class SOAPElementImpl
public Iterator getChildElements(Name name)
getChildElements
in interface SOAPElement
getChildElements
in class SOAPElementImpl
public SOAPElement addAttribute(QName qname, String value) throws SOAPException
addAttribute
in interface SOAPElement
addAttribute
in class SOAPElementImpl
SOAPException
public SOAPElement addChildElement(QName qname) throws SOAPException
addChildElement
in interface SOAPElement
addChildElement
in class SOAPElementImpl
SOAPException
public QName createQName(String localName, String prefix) throws SOAPException
SOAPElementImpl
createQName
in interface SOAPElement
createQName
in class SOAPElementImpl
localName
- - a String containing the local part of the name. prefix - a String
containing the prefix for the name.SOAPException
- - if the QName cannot be created.public Iterator getAllAttributesAsQNames()
getAllAttributesAsQNames
in interface SOAPElement
getAllAttributesAsQNames
in class SOAPElementImpl
public String getAttributeValue(QName qname)
getAttributeValue
in interface SOAPElement
getAttributeValue
in class SOAPElementImpl
public Iterator getChildElements(QName qname)
getChildElements
in interface SOAPElement
getChildElements
in class SOAPElementImpl
public QName getElementQName()
getElementQName
in interface SOAPElement
getElementQName
in class SOAPElementImpl
public boolean removeAttribute(QName qname)
removeAttribute
in interface SOAPElement
removeAttribute
in class SOAPElementImpl
public SOAPElement setElementQName(QName qname) throws SOAPException
setElementQName
in interface SOAPElement
setElementQName
in class SOAPElementImpl
SOAPException
public Iterator getChildElements()
SOAPElementImpl
Text
objects as well as SOAPElement
objects.getChildElements
in interface SOAPElement
getChildElements
in class SOAPElementImpl
Text
and SOAPElement
contained within this
SOAPElement
objectpublic SOAPElement addTextNode(String text) throws SOAPException
SOAPElementImpl
Text
object initialized with the given String
and
adds it to this SOAPElement
object.addTextNode
in interface SOAPElement
addTextNode
in class SOAPElementImpl
text
- a String
object with the textual content to be addedSOAPElement
object into which the new Text
object was
insertedSOAPException
- if there is an error in creating the new Text
objectCopyright © 2004-2012 Apache Software Foundation. All Rights Reserved.