Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  java.lang.Cloneable, org.w3c.dom.Element, Node, org.w3c.dom.Node, org.w3c.dom.NodeList, java.io.Serializable, SOAPBody, SOAPElement

public class SOAPBody
extends MessageElement
implements SOAPBody

Holder for body elements.

Author:
  Glyn Normington (glyn@apache.org)
See Also:
  Serialized Form

Nested Class Summary

Nested classes 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, typeQName`

Fields inherited from class org.apache.axis.message.NodeImpl
`_isDirty, attributes, children, document, name, namespaceURI, parent, prefix, textRep`

Fields inherited from interface org.w3c.dom.Node
`ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

Constructor Summary
`SOAPBody(java.lang.String namespace, java.lang.String localPart, java.lang.String prefix, org.xml.sax.Attributes attributes, DeserializationContext context, SOAPConstants soapConsts)`

Method Summary
`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)` Creates a new `SOAPElement` object initialized with the given `Name` object and adds the new element to this `SOAPElement` object.
`SOAPElement` | `addChildElement(SOAPElement element)` Add a `SOAPElement` as a child of this `SOAPElement` instance.
`SOAPElement` | `addChildElement(java.lang.String localName)` Creates a new `SOAPElement` object initialized with the given `String` object and adds the new element to this `SOAPElement` object.
`SOAPElement` | `addChildElement(java.lang.String localName, java.lang.String prefix)` Creates a new `SOAPElement` object initialized with the specified local name and prefix and adds the new element to this `SOAPElement` object.
`SOAPElement` | `addChildElement(java.lang.String localName, java.lang.String prefix, java.lang.String uri)` Creates a new `SOAPElement` object initialized with the specified local name, prefix, and URI and adds the new element to this `SOAPElement` object.
`SOAPBodyElement` | `addDocument(org.w3c.dom.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, java.lang.String s)` Creates a new `SOAPFault` object and adds it to this `SOAPBody` object.
`SOAPFault` | `addFault(Name name, java.lang.String s, java.util.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(java.lang.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)`

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, toString`

Methods inherited from class org.apache.axis.message.NodeImpl
`appendChild, 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, setPrefix`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface javax.xml.soap.SOAPElement
`addAttribute, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration`

Methods inherited from interface javax.xml.soap.Node
`detachNode, getParentElement, getValue, recycleNode, setValue`

Methods inherited from interface org.w3c.dom.Node
`appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix`

Methods inherited from interface org.w3c.dom.Element
`getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS`

Constructor Detail

### SOAPBody

    public SOAPBody(java.lang.String namespace,
                    java.lang.String localPart,
                    java.lang.String prefix,
                    org.xml.sax.Attributes attributes,
                    DeserializationContext context,
                    SOAPConstants soapConsts)
             throws AxisFault

Method Detail

### setParentElement

    public void setParentElement(SOAPElement parent)
                          throws SOAPException

  Description copied from interface: `Node`
  Sets the parent of this `Node` object to the given `SOAPElement` object.

  Specified by:
    `setParentElement` in interface `Node`
  Overrides:
    `setParentElement` in class `NodeImpl`
  Parameters:
    `parent` - the `SOAPElement` object to be set as the parent of this `Node` object
  Throws:
    `SOAPException` - if there is a problem in setting the parent to the given element
  See Also:
    `getParentElement()`

### disableFormatting

    public void disableFormatting()

### setEncodingStyle

    public void setEncodingStyle(java.lang.String encodingStyle)
                          throws SOAPException

  Description copied from interface: `SOAPElement`
  Sets the encoding style for this `SOAPElement` object to one specified.

  Specified by:
    `setEncodingStyle` in interface `SOAPElement`
  Overrides:
    `setEncodingStyle` in class `MessageElement`
  Parameters:
    `encodingStyle` - a `String` giving the encoding style
  Throws:
    `SOAPException`
  See Also:
    `getEncodingStyle()`

### outputImpl

    protected void outputImpl(SerializationContext context)
                       throws java.lang.Exception

  Description copied from class: `MessageElement`
  override point -output to a serialization context.

  Overrides:
    `outputImpl` in class `MessageElement`
  Parameters:
    `context` - destination.
  Throws:
    `java.lang.Exception` - if something went wrong.

### addBodyElement

    public SOAPBodyElement addBodyElement(Name name)
                                   throws SOAPException

  Description copied from interface: `SOAPBody`
  Creates a new `SOAPBodyElement` object with the specified name and adds it to this `SOAPBody` object.

  Specified by:
    `addBodyElement` in interface `SOAPBody`
  Parameters:
    `name` - a `Name` object with the name for the new `SOAPBodyElement` object
  Returns:
    the new `SOAPBodyElement` object
  Throws:
    `SOAPException` - if a SOAP error occurs

### addFault

    public SOAPFault addFault(Name name,
                              java.lang.String s,
                              java.util.Locale locale)
                       throws SOAPException

  Description copied from interface: `SOAPBody`
  Creates a new `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`.

  Specified by:
    `addFault` in interface `SOAPBody`
  Parameters:
    `name` - 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 QName
    `s` - a `String` giving an explanation of the fault
    `locale` - a `Locale` object indicating the native language of the faultString
  Returns:
    the new `SOAPFault` object
  Throws:
    `SOAPException` - if there is a SOAP error

### addFault

    public SOAPFault addFault(Name name,
                              java.lang.String s)
                       throws SOAPException

  Description copied from interface: `SOAPBody`
  Creates a new `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`.

  Specified by:
    `addFault` in interface `SOAPBody`
  Parameters:
    `name` - 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 QName
    `s` - a `String` giving an explanation of the fault
  Returns:
    the new `SOAPFault` object
  Throws:
    `SOAPException` - if there is a SOAP error

### addDocument

    public SOAPBodyElement addDocument(org.w3c.dom.Document document)
                                throws SOAPException

  Description copied from interface: `SOAPBody`
  Adds the root node of the DOM `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.

  Specified by:
    `addDocument` in interface `SOAPBody`
  Parameters:
    `document` - the `Document` object whose root node will be added to this `SOAPBody`
  Returns:
    the `SOAPBodyElement` that represents the root node that was added
  Throws:
    `SOAPException` - if the `Document` cannot be added

### addFault

    public SOAPFault addFault()
                       throws SOAPException

  Description copied from interface: `SOAPBody`
  Creates a new `SOAPFault` object and adds it to this `SOAPBody` object.

  Specified by:
    `addFault` in interface `SOAPBody`
  Returns:
    the new `SOAPFault` object
  Throws:
    `SOAPException` - if there is a SOAP error

### getFault

    public SOAPFault getFault()

  Description copied from interface: `SOAPBody`
  Returns the `SOAPFault` object in this `SOAPBody` object.

  Specified by:
    `getFault` in interface `SOAPBody`
  Returns:
    the `SOAPFault` object in this `SOAPBody` object

### hasFault

    public boolean hasFault()

  Description copied from interface: `SOAPBody`
  Indicates whether a `SOAPFault` object exists in this `SOAPBody` object.

  Specified by:
    `hasFault` in interface `SOAPBody`
  Returns:
    `true` if a `SOAPFault` object exists in this `SOAPBody` object; `false` otherwise

### addChild

    public void addChild(MessageElement element)
                  throws SOAPException

  Description copied from class: `MessageElement`
  Note that this method will log a error and no-op if there is a value (set using setObjectValue) in the MessageElement.

  Overrides:
    `addChild` in class `MessageElement`
  Throws:
    `SOAPException`

### addChildElement

    public SOAPElement addChildElement(SOAPElement element)
                                throws SOAPException

  Description copied from interface: `SOAPElement`
  Add a `SOAPElement` as a child of this `SOAPElement` instance. The `SOAPElement` is expected to be created by a `SOAPElementFactory`. Callers should not rely on the element instance being added as is into the XML tree. Implementations could end up copying the content of the `SOAPElement` passed into an instance of a different `SOAPElement` implementation. For instance if `addChildElement()` is called on a `SOAPHeader`, `element` will be copied into an instance of a `SOAPHeaderElement`.

  The fragment rooted in `element` is either added as a whole or not at all, if there was an error.

  The fragment rooted in `element` cannot contain elements named "Envelope", "Header" or "Body" and in the SOAP namespace. Any namespace prefixes present in the fragment should be fully resolved using appropriate namespace declarations within the fragment itself.

  Specified by:
    `addChildElement` in interface `SOAPElement`
  Overrides:
    `addChildElement` in class `MessageElement`
  Throws:
    `SOAPException`
  See Also:
    `SOAPElement.addChildElement(javax.xml.soap.SOAPElement)`

### addChildElement

    public SOAPElement addChildElement(Name name)
                                throws SOAPException

  Description copied from interface: `SOAPElement`
  Creates a new `SOAPElement` object initialized with the given `Name` object and adds the new element to this `SOAPElement` object.

  Specified by:
    `addChildElement` in interface `SOAPElement`
  Overrides:
    `addChildElement` in class `MessageElement`
  Parameters:
    `name` - uri, prefix and local name of the element to add
  Returns:
    the child element
  Throws:
    `SOAPException`
  See Also:
    `SOAPElement.addChildElement(javax.xml.soap.Name)`

### addChildElement

    public SOAPElement addChildElement(java.lang.String localName)
                                throws SOAPException

  Description copied from interface: `SOAPElement`
  Creates a new `SOAPElement` object initialized with the given `String` object and adds the new element to this `SOAPElement` object.

  Specified by:
    `addChildElement` in interface `SOAPElement`
  Overrides:
    `addChildElement` in class `MessageElement`
  Parameters:
    `localName` -
  Returns:
    the child element
  Throws:
    `SOAPException`
  See Also:
    `SOAPElement.addChildElement(String)`

### addChildElement

    public SOAPElement addChildElement(java.lang.String localName,
                                       java.lang.String prefix)
                                throws SOAPException

  Description copied from interface: `SOAPElement`
  Creates a new `SOAPElement` object initialized with the specified local name and prefix and adds the new element to this `SOAPElement` object.

  Specified by:
    `addChildElement` in interface `SOAPElement`
  Overrides:
    `addChildElement` in class `MessageElement`
  Parameters:
    `localName` -
    `prefix` -
  Returns:
    the child element
  Throws:
    `SOAPException`
  See Also:
    `SOAPElement.addChildElement(String, String)`

### addChildElement

    public SOAPElement addChildElement(java.lang.String localName,
                                       java.lang.String prefix,
                                       java.lang.String uri)
                                throws SOAPException

  Description copied from interface: `SOAPElement`
  Creates a new `SOAPElement` object initialized with the specified local name, prefix, and URI and adds the new element to this `SOAPElement` object.

  Specified by:
    `addChildElement` in interface `SOAPElement`
  Overrides:
    `addChildElement` in class `MessageElement`
  Parameters:
    `localName` -
    `prefix` -
    `uri` -
  Returns:
    the child element
  Throws:
    `SOAPException`
  See Also:
    `SOAPElement.addChildElement(String, String, String)`

### setSAAJEncodingCompliance

    public void setSAAJEncodingCompliance(boolean comply)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Apache Web Services Project. All Rights Reserved.