Add a
SOAPElement
as a child of this
SOAPElement
instance. The
SOAPElement
is expected to be created by a
SOAPFactory
. 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.
Returns:
an instance representing the new SOAP element that was
actually added to the tree.
Parameters:
- element - the SOAPElement
to be added as a
new child
Throws:
- SOAPException - if there was an error in adding this
element as a child