Package org.apache.axiom.om.util
Class CopyUtils
java.lang.Object
org.apache.axiom.om.util.CopyUtils
CopyUtils provides static utility methods that are useful for creating a copy of
an OM/SOAPEnvelope tree.
During the expansion, the Source tree retains its shape
(OMSourcedElement nodes are not expanded).
The Target tree has nodes that retain the class identity of the source node. For
example, a SOAPFault in the source tree will have a SOAPFault in the target tree.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.axiom.soap.SOAPEnvelope
copy
(org.apache.axiom.soap.SOAPEnvelope sourceEnv) Deprecated.static void
reader2writer
(XMLStreamReader reader, XMLStreamWriter writer) Deprecated.Instead useOMXMLBuilderFactory.createStAXOMBuilder(XMLStreamReader)
to create anOMDocument
and thenOMSerializable.serializeAndConsume(XMLStreamWriter)
to write to theXMLStreamWriter
.
-
Method Details
-
copy
public static org.apache.axiom.soap.SOAPEnvelope copy(org.apache.axiom.soap.SOAPEnvelope sourceEnv) Deprecated.This method has the same effect as callingOMInformationItem.clone(OMCloneOptions)
on the sourceSOAPEnvelope
with the following options enabled:OMCloneOptions.setFetchBlobs(boolean)
OMCloneOptions.setPreserveModel(boolean)
OMCloneOptions.setCopyOMDataSources(boolean)
OMInformationItem.clone(OMCloneOptions)
directly and fine tune the options for the particular use case. -
reader2writer
public static void reader2writer(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException Deprecated.Instead useOMXMLBuilderFactory.createStAXOMBuilder(XMLStreamReader)
to create anOMDocument
and thenOMSerializable.serializeAndConsume(XMLStreamWriter)
to write to theXMLStreamWriter
.Simple utility that takes an XMLStreamReader and writes it to an XMLStreamWriter- Parameters:
reader
-writer
-- Throws:
XMLStreamException
-
OMInformationItem.clone(OMCloneOptions)
on the sourceSOAPEnvelope
with the following options enabled:OMCloneOptions.setFetchBlobs(boolean)
OMCloneOptions.setPreserveModel(boolean)
OMCloneOptions.setCopyOMDataSources(boolean)
Instead of using this method, application code should useOMInformationItem.clone(OMCloneOptions)
directly and fine tune the options for the particular use case.