Spring Web Services Framework

org.springframework.ws.soap
Interface SoapElement

All Known Subinterfaces:
Soap11Body, Soap11Fault, Soap11Header, Soap12Body, Soap12Fault, Soap12Header, SoapBody, SoapEnvelope, SoapFault, SoapFaultDetail, SoapFaultDetailElement, SoapHeader, SoapHeaderElement

public interface SoapElement

The base interface for all elements that are contained in a SOAP message.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
SoapMessage

Method Summary
 void addAttribute(QName name, String value)
          Adds an attribute with the specified qualified name and value to this element.
 void addNamespaceDeclaration(String prefix, String namespaceUri)
          Adds a namespace declaration with the specified prefix and URI to this element.
 Iterator getAllAttributes()
          Returns an Iterator over all of the attributes in element as qualified names.
 String getAttributeValue(QName name)
          Returns the value of the attribute with the specified qualified name.
 QName getName()
          Returns the qualified name of this element.
 Source getSource()
          Returns the Source of this element.
 void removeAttribute(QName name)
          Removes the attribute with the specified name.
 

Method Detail

getName

QName getName()
Returns the qualified name of this element.

Returns:
the qualified name of this element

getSource

Source getSource()
Returns the Source of this element. This includes the element itself, i.e. SoapEnvelope.getSource() will include the Envelope tag.

Returns:
the Source of this element

addAttribute

void addAttribute(QName name,
                  String value)
Adds an attribute with the specified qualified name and value to this element.

Parameters:
name - the qualified name of the attribute
value - the value of the attribute

removeAttribute

void removeAttribute(QName name)
Removes the attribute with the specified name.

Parameters:
name - the qualified name of the attribute to remove

getAttributeValue

String getAttributeValue(QName name)
Returns the value of the attribute with the specified qualified name.

Parameters:
name - the qualified name
Returns:
the value, or null if there is no such attribute

getAllAttributes

Iterator getAllAttributes()
Returns an Iterator over all of the attributes in element as qualified names.

Returns:
an iterator over all the attribute names

addNamespaceDeclaration

void addNamespaceDeclaration(String prefix,
                             String namespaceUri)
Adds a namespace declaration with the specified prefix and URI to this element.

Parameters:
prefix - the namespace prefix. Can be empty or null to declare the default namespace
namespaceUri - the namespace uri
Throws:
SoapElementException - in case of errors

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.