javax.xml.soap
Interface SOAPBody

All Superinterfaces:
Node, SOAPElement
All Known Implementing Classes:
SOAPBody

public interface SOAPBody
extends SOAPElement

An object that represents the contents of the SOAP body element in a SOAP message. A SOAP body element consists of XML data that affects the way the application-specific content is processed.

A SOAPBody object contains SOAPBodyElement objects, which have the content for the SOAP body. A SOAPFault object, which carries status and/or error information, is an example of a SOAPBodyElement object.

See Also:
SOAPFault

Method Summary
 SOAPBodyElement addBodyElement(Name name)
          Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.
 SOAPFault addFault()
          Creates a new SOAPFault object and adds it to this SOAPBody object.
 SOAPFault getFault()
          Returns the SOAPFault object in this SOAPBody object.
 boolean hasFault()
          Indicates whether a SOAPFault object exists in this SOAPBody object.
 
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, removeAttribute, removeNamespaceDeclaration, setEncodingStyle
 
Methods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement
 

Method Detail

addFault

public SOAPFault addFault()
                   throws SOAPException
Creates a new SOAPFault object and adds it to this SOAPBody object.

Returns:
the new SOAPFault object
Throws:
SOAPException - if there is a SOAP error

hasFault

public boolean hasFault()
Indicates whether a SOAPFault object exists in this SOAPBody object.

Returns:
true if a SOAPFault object exists in this SOAPBody object; false otherwise

getFault

public SOAPFault getFault()
Returns the SOAPFault object in this SOAPBody object.

Returns:
the SOAPFault object in this SOAPBody object

addBodyElement

public SOAPBodyElement addBodyElement(Name name)
                               throws SOAPException
Creates a new SOAPBodyElement object with the specified name and adds it to this SOAPBody object.

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


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