|
|||||||||
| Home >> All >> javax >> xml >> [ soap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.xml.soap
Interface SOAPElement

- All Superinterfaces:
- org.w3c.dom.Element, Node, org.w3c.dom.Node
- All Known Subinterfaces:
- Detail, DetailEntry, SOAPBody, SOAPBodyElement, SOAPEnvelope, SOAPFault, SOAPFaultElement, SOAPHeader, SOAPHeaderElement
- public interface SOAPElement
- extends Node, org.w3c.dom.Element
An object representing the contents in a
SOAPBody object, the contents in a SOAPHeader
object, the content that can follow the SOAPBody object in a
SOAPEnvelope object, or what can follow the detail element
in a SOAPFault object. It is
the base class for all of the classes that represent the SOAP objects as
defined in the SOAP specification.
| Field Summary |
| Method Summary | |
SOAPElement |
addAttribute(Name name,
java.lang.String value)
Adds an attribute with the specified name and value to this SOAPElement object. |
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. |
SOAPElement |
addNamespaceDeclaration(java.lang.String prefix,
java.lang.String uri)
Adds a namespace declaration with the specified prefix and URI to this SOAPElement object. |
SOAPElement |
addTextNode(java.lang.String text)
Creates a new Text object initialized with the given
String and adds it to this SOAPElement object. |
java.util.Iterator |
getAllAttributes()
Returns an iterator over all of the attribute names in this SOAPElement object. |
java.lang.String |
getAttributeValue(Name name)
Returns the value of the attribute with the specified name. |
java.util.Iterator |
getChildElements()
Returns an iterator over all the immediate content of this element. |
java.util.Iterator |
getChildElements(Name name)
Returns an iterator over all the child elements with the specified name. |
Name |
getElementName()
Returns the name of this SOAPElement
object. |
java.lang.String |
getEncodingStyle()
Returns the encoding style for this
SOAPElement object. |
java.util.Iterator |
getNamespacePrefixes()
Returns an iterator of namespace prefixes. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the URI of the namespace that has the given prefix. |
java.util.Iterator |
getVisibleNamespacePrefixes()
Returns an Iterator over the namespace prefix
Strings visible to this element. |
boolean |
removeAttribute(Name name)
Removes the attribute with the specified name. |
void |
removeContents()
Detaches all children of this SOAPElement. |
boolean |
removeNamespaceDeclaration(java.lang.String prefix)
Removes the namespace declaration corresponding to the given prefix. |
void |
setEncodingStyle(java.lang.String encodingStyle)
Sets the encoding style for this SOAPElement
object to one specified. |
| Methods inherited from interface javax.xml.soap.Node |
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue |
| Methods 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, setUserData |
| Methods 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, setIdAttributeNS |
| Method Detail |
addChildElement
public SOAPElement addChildElement(Name name) throws SOAPException
- Creates a new
SOAPElementobject initialized with the givenNameobject and adds the new element to thisSOAPElementobject.
addChildElement
public SOAPElement addChildElement(java.lang.String localName) throws SOAPException
- Creates a new
SOAPElementobject initialized with the givenStringobject and adds the new element to thisSOAPElementobject.
addChildElement
public SOAPElement addChildElement(java.lang.String localName, java.lang.String prefix) throws SOAPException
- Creates a new
SOAPElementobject initialized with the specified local name and prefix and adds the new element to thisSOAPElementobject.
addChildElement
public SOAPElement addChildElement(java.lang.String localName, java.lang.String prefix, java.lang.String uri) throws SOAPException
- Creates a new
SOAPElementobject initialized with the specified local name, prefix, and URI and adds the new element to thisSOAPElementobject.
addChildElement
public SOAPElement addChildElement(SOAPElement element) throws SOAPException
- Add a
SOAPElementas a child of thisSOAPElementinstance. TheSOAPElementis expected to be created by aSOAPElementFactory. Callers should not rely on the element instance being added as is into the XML tree. Implementations could end up copying the content of theSOAPElementpassed into an instance of a differentSOAPElementimplementation. For instance ifaddChildElement()is called on aSOAPHeader,elementwill be copied into an instance of aSOAPHeaderElement.The fragment rooted in
elementis either added as a whole or not at all, if there was an error.The fragment rooted in
elementcannot 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.
addTextNode
public SOAPElement addTextNode(java.lang.String text) throws SOAPException
- Creates a new
Textobject initialized with the givenStringand adds it to thisSOAPElementobject.
addAttribute
public SOAPElement addAttribute(Name name, java.lang.String value) throws SOAPException
- Adds an attribute with the specified name and value to this
SOAPElementobject.
addNamespaceDeclaration
public SOAPElement addNamespaceDeclaration(java.lang.String prefix, java.lang.String uri) throws SOAPException
- Adds a namespace declaration with the specified prefix and URI to this
SOAPElementobject.
getAttributeValue
public java.lang.String getAttributeValue(Name name)
- Returns the value of the attribute with the specified
name.
getAllAttributes
public java.util.Iterator getAllAttributes()
- Returns an iterator over all of the attribute names in
this
SOAPElementobject. The iterator can be used to get the attribute names, which can then be passed to the methodgetAttributeValueto retrieve the value of each attribute.
getNamespaceURI
public java.lang.String getNamespaceURI(java.lang.String prefix)
- Returns the URI of the namespace that has the given
prefix.
getNamespacePrefixes
public java.util.Iterator getNamespacePrefixes()
- Returns an iterator of namespace prefixes. The iterator
can be used to get the namespace prefixes, which can then be
passed to the method
getNamespaceURIto retrieve the URI of each namespace.
getElementName
public Name getElementName()
- Returns the name of this
SOAPElementobject.
removeAttribute
public boolean removeAttribute(Name name)
- Removes the attribute with the specified name.
removeNamespaceDeclaration
public boolean removeNamespaceDeclaration(java.lang.String prefix)
- Removes the namespace declaration corresponding to the
given prefix.
getChildElements
public java.util.Iterator getChildElements()
- Returns an iterator over all the immediate content of
this element. This includes
Textobjects as well asSOAPElementobjects.
getChildElements
public java.util.Iterator getChildElements(Name name)
- Returns an iterator over all the child elements with the
specified name.
setEncodingStyle
public void setEncodingStyle(java.lang.String encodingStyle) throws SOAPException
- Sets the encoding style for this
SOAPElementobject to one specified.
getEncodingStyle
public java.lang.String getEncodingStyle()
- Returns the encoding style for this
SOAPElementobject.
removeContents
public void removeContents()
- Detaches all children of this
SOAPElement.This method is useful for rolling back the construction of partially completed
SOAPHeadersandSOAPBodysin reparation for sending a fault when an error condition is detected. It is also useful for recycling portions of a document within a SOAP message.
getVisibleNamespacePrefixes
public java.util.Iterator getVisibleNamespacePrefixes()
- Returns an
Iteratorover the namespace prefixStrings visible to this element. The prefixes returned by this iterator can be passed to the methodgetNamespaceURI()to retrieve the URI of each namespace.
|
|||||||||
| Home >> All >> javax >> xml >> [ soap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC