Package org.apache.axis.message
Class SOAPBody
java.lang.Object
org.apache.axis.message.NodeImpl
org.apache.axis.message.MessageElement
org.apache.axis.message.SOAPBody
- All Implemented Interfaces:
Serializable,Cloneable,Node,SOAPBody,SOAPElement,Element,Node,NodeList
Holder for body elements.
- Author:
- Glyn Normington (glyn@apache.org)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.axis.message.MessageElement
MessageElement.QNameAttr -
Field Summary
Fields inherited from class org.apache.axis.message.MessageElement
_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQNameFields inherited from class org.apache.axis.message.NodeImpl
_isDirty, attributes, children, document, name, namespaceURI, parent, prefix, textRepFields inherited from interface org.w3c.dom.Node
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 Summary
ConstructorsConstructorDescriptionSOAPBody(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context, SOAPConstants soapConsts) -
Method Summary
Modifier and TypeMethodDescriptionaddBodyElement(Name name) Creates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.voidaddChild(MessageElement element) Note that this method will log a error and no-op if there is a value (set using setObjectValue) in the MessageElement.addChildElement(String localName) add a child element in the message element's own namespaceaddChildElement(String localName, String prefix) add a child elementaddChildElement(String localName, String prefix, String uri) add a child elementaddChildElement(Name name) add the child elementaddChildElement(SOAPElement element) The added child must be an instance of MessageElement rather than an abitrary SOAPElement otherwise a (wrapped) ClassCastException will be thrown.addDocument(Document document) Adds the root node of the DOMDocumentto thisSOAPBodyobject.addFault()Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.voidgetFault()Returns theSOAPFaultobject in thisSOAPBodyobject.booleanhasFault()Indicates whether aSOAPFaultobject exists in thisSOAPBodyobject.protected voidoutputImpl(SerializationContext context) override point -output to a serialization context.voidsetEncodingStyle(String encodingStyle) Sets the encoding style for thisSOAPElementobject to one specified.voidsetParentElement(SOAPElement parent) Sets the parent of thisNodeobject to the givenSOAPElementobject.voidsetSAAJEncodingCompliance(boolean comply) Methods inherited from class org.apache.axis.message.MessageElement
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, toStringMethods inherited from class org.apache.axis.message.NodeImpl
appendChild, compareDocumentPosition, convertAttrSAXtoDOM, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTextContent, getUserData, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDefaultNamespace, isDirty, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, makeAttributesEditable, normalize, recycleNode, removeChild, replaceChild, reset, setDirty, setDirty, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setOwnerDocument, setParent, setPrefix, setTextContent, setUserDataMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setValueMethods inherited from interface org.w3c.dom.Node
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, setUserDataMethods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration
-
Constructor Details
-
SOAPBody
public SOAPBody(String namespace, String localPart, String prefix, Attributes attributes, DeserializationContext context, SOAPConstants soapConsts) throws AxisFault - Throws:
AxisFault
-
-
Method Details
-
setParentElement
Description copied from class:NodeImplSets the parent of thisNodeobject to the givenSOAPElementobject.- Specified by:
setParentElementin interfaceNode- Overrides:
setParentElementin classNodeImpl- Parameters:
parent- theSOAPElementobject to be set as the parent of thisNodeobject- Throws:
SOAPException- if there is a problem in setting the parent to the given element- See Also:
-
disableFormatting
public void disableFormatting() -
setEncodingStyle
Description copied from class:MessageElementSets the encoding style for thisSOAPElementobject 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 "".- Specified by:
setEncodingStylein interfaceSOAPElement- Overrides:
setEncodingStylein classMessageElement- Parameters:
encodingStyle- aStringgiving the encoding style- Throws:
SOAPException- See Also:
-
outputImpl
Description copied from class:MessageElementoverride point -output to a serialization context.- Overrides:
outputImplin classMessageElement- Parameters:
context- destination.- Throws:
Exception- if something went wrong.
-
addBodyElement
Description copied from interface:SOAPBodyCreates a newSOAPBodyElementobject with the specified name and adds it to thisSOAPBodyobject.- Specified by:
addBodyElementin interfaceSOAPBody- Parameters:
name- aNameobject with the name for the newSOAPBodyElementobject- Returns:
- the new
SOAPBodyElementobject - Throws:
SOAPException- if a SOAP error occurs
-
addFault
Description copied from interface:SOAPBodyCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject. The newSOAPFaultwill have afaultcodeelement that is set to thefaultCodeparameter and afaultstringset tofaultstringand localized tolocale.- Specified by:
addFaultin interfaceSOAPBody- Parameters:
name- aNameobject 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- aStringgiving an explanation of the faultlocale- aLocaleobject indicating the native language of thefaultString - Returns:
- the new
SOAPFaultobject - Throws:
SOAPException- if there is a SOAP error
-
addFault
Description copied from interface:SOAPBodyCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject. The newSOAPFaultwill have afaultcodeelement that is set to thefaultCodeparameter and afaultstringset tofaultstring.- Specified by:
addFaultin interfaceSOAPBody- Parameters:
name- aNameobject 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- aStringgiving an explanation of the fault- Returns:
- the new
SOAPFaultobject - Throws:
SOAPException- if there is a SOAP error
-
addDocument
Description copied from interface:SOAPBodyAdds the root node of the DOMDocumentto thisSOAPBodyobject.Calling this method invalidates the
documentparameter. The client application should discard all references to thisDocumentand its contents upon callingaddDocument. The behavior of an application that continues to use such references is undefined.- Specified by:
addDocumentin interfaceSOAPBody- Parameters:
document- theDocumentobject whose root node will be added to thisSOAPBody- Returns:
- the
SOAPBodyElementthat represents the root node that was added - Throws:
SOAPException- if theDocumentcannot be added
-
addFault
Description copied from interface:SOAPBodyCreates a newSOAPFaultobject and adds it to thisSOAPBodyobject.- Specified by:
addFaultin interfaceSOAPBody- Returns:
- the new
SOAPFaultobject - Throws:
SOAPException- if there is a SOAP error
-
getFault
Description copied from interface:SOAPBodyReturns theSOAPFaultobject in thisSOAPBodyobject. -
hasFault
public boolean hasFault()Description copied from interface:SOAPBodyIndicates whether aSOAPFaultobject exists in thisSOAPBodyobject. -
addChild
Description copied from class:MessageElementNote that this method will log a error and no-op if there is a value (set using setObjectValue) in the MessageElement.- Overrides:
addChildin classMessageElement- Throws:
SOAPException
-
addChildElement
Description copied from class:MessageElementThe added child must be an instance of MessageElement rather than an abitrary SOAPElement otherwise a (wrapped) ClassCastException will be thrown.- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classMessageElement- Parameters:
element- theSOAPElementto be added as a new child- Returns:
- an instance representing the new SOAP element that was actually added to the tree.
- Throws:
SOAPException- if there was an error in adding this element as a child- See Also:
-
addChildElement
Description copied from class:MessageElementadd the child element- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classMessageElement- Parameters:
name- uri, prefix and local name of the element to add- Returns:
- the child element
- Throws:
SOAPException- See Also:
-
addChildElement
Description copied from class:MessageElementadd a child element in the message element's own namespace- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classMessageElement- Parameters:
localName-- Returns:
- the child element
- Throws:
SOAPException- See Also:
-
addChildElement
Description copied from class:MessageElementadd a child element- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classMessageElement- Parameters:
localName-prefix-- Returns:
- the child element
- Throws:
SOAPException- See Also:
-
addChildElement
public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException Description copied from class:MessageElementadd a child element- Specified by:
addChildElementin interfaceSOAPElement- Overrides:
addChildElementin classMessageElement- Parameters:
localName-prefix-uri-- Returns:
- the child element
- Throws:
SOAPException- See Also:
-
setSAAJEncodingCompliance
public void setSAAJEncodingCompliance(boolean comply)
-