public class SOAPBody extends MessageElement implements SOAPBody
MessageElement.QNameAttr_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQName_isDirty, attributes, children, document, name, namespaceURI, parent, prefix, textRepATTRIBUTE_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 |
|---|
SOAPBody(String namespace,
String localPart,
String prefix,
Attributes attributes,
DeserializationContext context,
SOAPConstants soapConsts) |
| 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. |
void |
addChild(MessageElement element)
Note that this method will log a error and no-op if there is
a value (set using setObjectValue) in the MessageElement.
|
SOAPElement |
addChildElement(Name name)
add the child element
|
SOAPElement |
addChildElement(SOAPElement element)
The added child must be an instance of MessageElement rather than
an abitrary SOAPElement otherwise a (wrapped) ClassCastException
will be thrown.
|
SOAPElement |
addChildElement(String localName)
add a child element in the message element's own namespace
|
SOAPElement |
addChildElement(String localName,
String prefix)
add a child element
|
SOAPElement |
addChildElement(String localName,
String prefix,
String uri)
add a child element
|
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 name,
String s)
Creates a new
SOAPFault object and adds it to this
SOAPBody object. |
SOAPFault |
addFault(Name name,
String s,
Locale locale)
Creates a new
SOAPFault object and adds it to this
SOAPBody object. |
void |
disableFormatting() |
SOAPFault |
getFault()
Returns the
SOAPFault object in this SOAPBody
object. |
boolean |
hasFault()
Indicates whether a
SOAPFault object exists in
this SOAPBody object. |
protected void |
outputImpl(SerializationContext context)
override point -output to a serialization context.
|
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this
SOAPElement
object to one specified. |
void |
setParentElement(SOAPElement parent)
Sets the parent of this
Node object to the given
SOAPElement object. |
void |
setSAAJEncodingCompliance(boolean comply) |
addAttribute, addAttribute, addAttribute, addAttribute, addMapping, addNamespaceDeclaration, addTextNode, childDeepCloned, cloneNode, cloning, detachAllChildren, equals, findElement, getAllAttributes, getAsDocument, getAsDOM, getAsString, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributesEx, getAttributeValue, getAttributeValue, getChildElement, getChildElements, getChildElements, getChildElements, getChildren, getCompleteAttributes, getDeserializationContext, getElementName, getElementsByTagName, getElementsByTagNameNS, getElementsNS, getEncodingStyle, getEnvelope, getFixupDeserializer, getHref, getID, getLength, getName, getNamespacePrefixes, getNamespaceURI, getObjectValue, getObjectValue, getOwnerDocument, getPrefix, getQName, getRealElement, getRecorder, getTagName, getType, getValue, getValueAsType, getValueAsType, getValueDOM, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, isRoot, item, output, publishContents, publishToHandler, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAllAttributes, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setContentsIndex, setEndIndex, setEnvelope, setFixupDeserializer, setName, setNamespaceURI, setNSMappings, setObjectValue, setQName, setRecorder, setType, setValue, toStringappendChild, convertAttrSAXtoDOM, detachNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDirty, isSupported, makeAttributesEditable, normalize, recycleNode, removeChild, replaceChild, reset, setDirty, setDirty, setNodeValue, setOwnerDocument, setParent, setPrefixclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttribute, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclarationdetachNode, 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, 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, setUserDatapublic SOAPBody(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context, SOAPConstants soapConsts) throws AxisFault
AxisFaultpublic void setParentElement(SOAPElement parent) throws SOAPException
NodeImplNode object to the given
SOAPElement object.setParentElement in class NodeImplparent - 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 elementgetParentElement()public void disableFormatting()
public void setEncodingStyle(String encodingStyle) throws SOAPException
MessageElementSOAPElement
object to one specified. The semantics of a null value,
as above in getEncodingStyle() are to just use the parent's value,
but null here means set to "".setEncodingStyle in interface SOAPElementsetEncodingStyle in class MessageElementencodingStyle - a String
giving the encoding styleSOAPExceptiongetEncodingStyle()protected void outputImpl(SerializationContext context) throws Exception
MessageElementoutputImpl in class MessageElementcontext - destination.Exception - if something went wrong.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 occurspublic SOAPFault addFault(Name name, String s, Locale locale) throws SOAPException
SOAPBodySOAPFault 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 SOAPBodyname - 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 QNames - 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 name, String s) throws SOAPException
SOAPBodySOAPFault 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 SOAPBodyname - 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 QNames - a String giving an explanation of the
faultSOAPFault objectSOAPException - if there is a SOAP errorpublic 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 SOAPBodySOAPBodyElement that represents the root node
that was addedSOAPException - if the Document cannot be addedpublic SOAPFault addFault() throws SOAPException
SOAPBodySOAPFault object and adds it to
this SOAPBody object.addFault in interface SOAPBodySOAPFault objectSOAPException - if there is a SOAP errorpublic SOAPFault getFault()
SOAPBodySOAPFault object in this SOAPBody
object.public boolean hasFault()
SOAPBodySOAPFault object exists in
this SOAPBody object.public void addChild(MessageElement element) throws SOAPException
MessageElementaddChild in class MessageElementSOAPExceptionpublic SOAPElement addChildElement(SOAPElement element) throws SOAPException
MessageElementaddChildElement in interface SOAPElementaddChildElement in class MessageElementelement - the SOAPElement to be added as a
new childSOAPException - if there was an error in adding this
element as a childSOAPElement.addChildElement(javax.xml.soap.SOAPElement)public SOAPElement addChildElement(Name name) throws SOAPException
MessageElementaddChildElement in interface SOAPElementaddChildElement in class MessageElementname - uri, prefix and local name of the element to addSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(javax.xml.soap.Name)public SOAPElement addChildElement(String localName) throws SOAPException
MessageElementaddChildElement in interface SOAPElementaddChildElement in class MessageElementlocalName - a String giving the local name for
the elementSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(String)public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
MessageElementaddChildElement in interface SOAPElementaddChildElement in class MessageElementlocalName - a String giving the local name for
the new elementprefix - a String giving the namespace prefix for
the new elementSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(String, String)public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
MessageElementaddChildElement in interface SOAPElementaddChildElement in class MessageElementlocalName - a String giving the local name for
the new elementprefix - a String giving the namespace prefix for
the new elementuri - a String giving the URI of the namespace
to which the new element belongsSOAPException - if there is an error in creating the
SOAPElement objectSOAPElement.addChildElement(String, String, String)public void setSAAJEncodingCompliance(boolean comply)
Copyright © The Apache Software Foundation. All Rights Reserved.