# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Interfaces
  Interface and Description
  org.apache.axiom.om.impl.builder.XOPBuilder

- Deprecated Classes
  Class and Description
  org.apache.axiom.attachments.lifecycle.impl.DataHandlerExtImpl This class is no longer used in Axiom 1.2.13 and will be removed in Axiom 1.3.
  org.apache.axiom.om.ds.OMDataSourceExtBase As described in AXIOM-419, this class has multiple issues and should no longer be used as a base class for `OMDataSource` implementations. Instead, use `AbstractOMDataSource`, `AbstractPullOMDataSource` or `AbstractPushOMDataSource`.

- Deprecated Fields
  Field and Description
  org.apache.axiom.om.OMConstants.ARRAY_ITEM_LOCALNAME This constant was used in early prototypes of Axis2 and is no longer relevant.
  org.apache.axiom.om.OMConstants.ARRAY_ITEM_NS_PREFIX This constant was used in early prototypes of Axis2 and is no longer relevant.
  org.apache.axiom.om.OMConstants.ARRAY_ITEM_NSURI This constant was used in early prototypes of Axis2 and is no longer relevant.
  org.apache.axiom.om.OMConstants.ARRAY_ITEM_QNAME This constant was used in early prototypes of Axis2 and is no longer relevant.
  org.apache.axiom.om.impl.MTOMConstants.ATTACHMENTS This was used in old versions of Axis2 as the key identifying the attachments map in the message context. You should no longer use this.
  org.apache.axiom.om.OMConstants.DATA_HANDLER
  org.apache.axiom.om.OMConstants.DEFAULT_DEFAULT_NAMESPACE
  org.apache.axiom.om.OMConstants.IS_BINARY
  org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE
  org.apache.axiom.om.OMDataSourceExt.LOSSY_PREFIX To create an `OMSourcedElement` with unknown prefix, use `OMFactory.createOMElement(OMDataSource, String, OMNamespace)` and pass `null` as prefix.
  org.apache.axiom.om.OMConstants.PULL_TYPE_BUILDER This constant is used as return value of `OMXMLParserWrapper.getBuilderType()` which is deprecated.
  org.apache.axiom.om.OMConstants.PUSH_TYPE_BUILDER This constant is used as return value of `OMXMLParserWrapper.getBuilderType()` which is deprecated.
  org.apache.axiom.om.OMOutputFormat.RESPECT_SWA_ATTACHMENT_ORDER As of version 1.2.13, Axiom always respects the order of attachments.
  org.apache.axiom.om.OMOutputFormat.RESPECT_SWA_ATTACHMENT_ORDER_DEFAULT As of version 1.2.13, Axiom always respects the order of attachments.
  org.apache.axiom.om.impl.MTOMConstants.ROOT_PART
  org.apache.axiom.om.OMConstants.XMLNS_NS_PREFIX Use `XMLConstants.XMLNS_ATTRIBUTE` instead.
  org.apache.axiom.om.OMConstants.XMLNS_NS_URI Use `XMLConstants.XMLNS_ATTRIBUTE_NS_URI` instead.

- Deprecated Methods
  Method and Description
  org.apache.axiom.om.util.CopyUtils.copy(SOAPEnvelope) This method has the same effect as calling `OMInformationItem.clone(OMCloneOptions)` on the source `SOAPEnvelope` with the following options enabled: `OMCloneOptions.setFetchDataHandlers(boolean)` `OMCloneOptions.setPreserveModel(boolean)` `OMCloneOptions.setCopyOMDataSources(boolean)` Instead of using this method, application code should use `OMInformationItem.clone(OMCloneOptions)` directly and fine tune the options for the particular use case.
  org.apache.axiom.om.util.StAXUtils.createNetworkDetachedXMLStreamReader(InputStream) use `StAXUtils.createXMLStreamReader(StAXParserConfiguration, InputStream)` with `StAXParserConfiguration.STANDALONE`
  org.apache.axiom.om.util.StAXUtils.createNetworkDetachedXMLStreamReader(InputStream, String) use `StAXUtils.createXMLStreamReader(StAXParserConfiguration, InputStream, String)` with `StAXParserConfiguration.STANDALONE`
  org.apache.axiom.om.util.StAXUtils.createNetworkDetachedXMLStreamReader(Reader) use `StAXUtils.createXMLStreamReader(StAXParserConfiguration, Reader)` with `StAXParserConfiguration.STANDALONE`
  org.apache.axiom.om.OMFactory.createOMText(OMContainer, char[], int)
  org.apache.axiom.om.OMFactory.createOMText(OMContainer, QName) This method is only meaningful if it is used to create a text node that is the single child of an `OMElement`. However, for that purpose `OMElement.setText(QName)` should be used.
  org.apache.axiom.om.OMFactory.createOMText(OMContainer, QName, int) Creating a text node containing a QName and having a type other than `OMNode.TEXT_NODE` is not meaningful.
  org.apache.axiom.om.impl.builder.StAXOMBuilder.createPrefix() A builder doesn't need to generate prefixes.
  org.apache.axiom.soap.SOAPFactory.createSOAPMessage(OMXMLParserWrapper) This method only exists for compatibility with Spring-WS and should not be used by application code.
  org.apache.axiom.util.base64.Base64Utils.decode(char[], int, int)
  org.apache.axiom.util.base64.Base64Utils.decode(char[], int, int, OutputStream)
  org.apache.axiom.util.base64.Base64Utils.decode(String, OutputStream)
  org.apache.axiom.attachments.lifecycle.DataHandlerExt.deleteWhenReadOnce() Use `DataHandlerExt.readOnce()` or `DataHandlerExt.purgeDataSource()` instead.
  org.apache.axiom.om.OMXMLParserWrapper.discard(OMElement) Use `OMNode.discard()` to discard elements.
  org.apache.axiom.util.base64.Base64Utils.encode(byte[])
  org.apache.axiom.util.base64.Base64Utils.encode(byte[], int, int)
  org.apache.axiom.util.base64.Base64Utils.encode(byte[], int, int, OutputStream)
  org.apache.axiom.util.base64.Base64Utils.encode(byte[], int, int, StringBuffer)
  org.apache.axiom.util.base64.Base64Utils.encode(byte[], int, int, Writer)
  org.apache.axiom.om.OMXMLParserWrapper.getBuilderType() This method is no longer used.
  org.apache.axiom.om.util.ElementHelper.getChildWithName(OMElement, String) please use OMElement.getFirstChildWithName(qname) instead!
  org.apache.axiom.om.util.ElementHelper.getContentID(XMLStreamReader, String) use `ElementHelper.getContentID(XMLStreamReader)` instead (see AXIOM-129)
  org.apache.axiom.attachments.lifecycle.impl.FileAccessor.getDataHandler(String) This method is no longer used in Axiom 1.2.13 and will be removed in Axiom 1.3.
  org.apache.axiom.om.util.StAXUtils.getEventTypeString(int) Use `XMLEventUtils.getEventTypeString(int)` instead
  org.apache.axiom.attachments.Attachments.getIncomingAttachmentsAsSingleStream() As of Axiom 1.2.13, this method is no longer supported.
  org.apache.axiom.om.OMOutputFormat.getMultipartWriterFactory()
  org.apache.axiom.om.OMNamespace.getName() This method is deprecated. Please use getNamespaceURI() method instead.
  org.apache.axiom.om.OMText.getNamespace() This API is going away. Please use `OMElement.getTextAsQName()` instead.
  org.apache.axiom.om.util.StAXUtils.getNetworkDetachedXMLInputFactory() use `StAXUtils.getXMLInputFactory(StAXParserConfiguration)` with `StAXParserConfiguration.STANDALONE`
  org.apache.axiom.om.impl.util.OMSerializerUtil.getNextNSPrefix()
  org.apache.axiom.om.impl.util.OMSerializerUtil.getNextNSPrefix(XMLStreamWriter) This is an internal method that is no longer used.
  org.apache.axiom.soap.SOAPFaultNode.getNodeValue() This method conflicts with `Node.getNodeValue()` and will be removed in Axiom 1.3. Please use `SOAPFaultNode.getFaultNodeValue()` instead.
  org.apache.axiom.om.OMXMLParserWrapper.getRegisteredContentHandler() This method is no longer used; implementations will always throw `UnsupportedOperationException`.
  org.apache.axiom.soap.SOAP12Version.getSingleton() Use `SOAPVersion.SOAP12` instead.
  org.apache.axiom.soap.SOAP11Version.getSingleton() Use `SOAPVersion.SOAP11` instead.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSoapMessage() Use `SOAPModelBuilder.getSOAPMessage()` instead.
  org.apache.axiom.attachments.Attachments.getSOAPPartContentID() Use `Attachments.getRootPartContentID()` instead.
  org.apache.axiom.attachments.Attachments.getSOAPPartContentType() Use `Attachments.getRootPartContentType()` instead.
  org.apache.axiom.attachments.Attachments.getSOAPPartInputStream() Use `Attachments.getRootPartInputStream()` instead.
  org.apache.axiom.om.OMText.getTextAsQName() If the underlying parser is non coalescing, then this method may unexpectedly fail or return an incorrect result. Always use `OMElement.getTextAsQName()` to get the QName value of an element.
  org.apache.axiom.om.util.ElementHelper.getTextAsStream(OMElement, boolean) Use `OMElement.getTextAsStream(boolean)` instead.
  org.apache.axiom.om.OMText.getTextCharacters()
  org.apache.axiom.om.impl.builder.StAXBuilder.init(InputStream, String, String, String) Not used anywhere
  org.apache.axiom.om.OMOutputFormat.isAutoCloseWriter()
  org.apache.axiom.om.OMText.isCharacters()
  org.apache.axiom.om.OMXMLStreamReader.isInlineMTOM() This method will be removed in a future release of Axiom. See `OMXMLStreamReader.setInlineMTOM(boolean)` for more details.
  org.apache.axiom.om.impl.MTOMXMLStreamWriter.isOptimizedThreshold(OMText) Serialization code should use `XMLStreamWriterUtils.writeDataHandler(XMLStreamWriter, DataHandler, String, boolean)` or `XMLStreamWriterUtils.writeDataHandler(XMLStreamWriter, DataHandlerProvider, String, boolean)` to submit any binary content and let this writer decide whether the content should be written as base64 encoded character data or using `xop:Include`. If this is not possible, then `MTOMXMLStreamWriter.prepareDataHandler(DataHandler)` should be used. All the aforementioned methods take into account the settings defined in `OMOutputFormat` to determine whether the binary data should be optimized or not. Therefore, there is not need for this method anymore.
  org.apache.axiom.om.impl.util.OMSerializerUtil.isSetPrefixBeforeStartElement(XMLStreamWriter) This method was used to work around a StAX conformance issue in early versions of the XL XP-J parser. This is now handled by `StAXDialect`, and this method always returns `false`.
  org.apache.axiom.util.base64.Base64Utils.isValidBase64Encoding(String)
  org.apache.axiom.om.OMXMLParserWrapper.registerExternalContentHandler(Object) This method is no longer used; implementations will always throw `UnsupportedOperationException`.
  org.apache.axiom.om.impl.builder.StAXBuilder.releaseParserOnClose(boolean) As of Axiom 1.2.15, the builder always releases the parser.
  org.apache.axiom.om.util.StAXUtils.releaseXMLInputFactory(XMLInputFactory) Returns an XMLInputFactory instance for reuse.
  org.apache.axiom.om.util.StAXUtils.releaseXMLOutputFactory(XMLOutputFactory) Returns an XMLOutputFactory instance for reuse.
  org.apache.axiom.om.util.StAXUtils.reset()
  org.apache.axiom.om.util.ElementHelper.resolveQName(String) The algorithm used by this method is incorrect. See AXIOM-356 for more details.
  org.apache.axiom.om.util.ElementHelper.resolveQName(String, boolean) The algorithm used by this method is incorrect. See AXIOM-356 for more details.
  org.apache.axiom.om.OMNode.serialize(OutputStream) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serialize(OutputStream, OMOutputFormat) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serialize(Writer) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serialize(Writer, OMOutputFormat) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serializeAndConsume(OutputStream) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serializeAndConsume(OutputStream, OMOutputFormat) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serializeAndConsume(Writer) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.OMNode.serializeAndConsume(Writer, OMOutputFormat) This method is not meaningful on a node in general, but only on an `OMElement`.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeAttribute(OMAttribute, XMLStreamWriter) use serializeStartpart instead
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeAttributes(OMElement, XMLStreamWriter) Consider using serializeStartpart instead
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMElement, XMLStreamWriter) This is an internal method that is no longer used.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMElement, XMLStreamWriter, boolean) This is an internal method that is no longer used.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeEndpart(XMLStreamWriter) This is an internal method that is no longer used.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeNamespace(OMNamespace, XMLStreamWriter) Use serializeStartpart instead
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeNamespaces(OMElement, XMLStreamWriter) Use serializeStartpart instead
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeNormal(OMElement, XMLStreamWriter, boolean) This is an internal method that is no longer used.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMElement, String, XMLStreamWriter) This is an internal method that is no longer used.
  org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMElement, XMLStreamWriter) This is an internal method that is no longer used.
  org.apache.axiom.om.OMOutputFormat.setAutoCloseWriter(boolean)
  org.apache.axiom.om.OMSourcedElement.setDataSource(OMDataSource) This method is deprecated because its semantics are not clearly defined. In particular it is unspecified whether the name of the element may change as a result of an invocation of this method.
  org.apache.axiom.om.impl.builder.StAXOMBuilder.setDoDebug(boolean)
  org.apache.axiom.om.OMXMLStreamReader.setInlineMTOM(boolean) To return optimized base64 content as `xop:Include` elements, wrap the reader using `XOPEncodingStreamReader` or use the more generic `XOPUtils.getXOPEncodedStream(XMLStreamReader)` method. This method introduces unnecessary complexity in the `XMLStreamReader` implementation used by Axiom and will be removed in a future release.
  org.apache.axiom.om.OMOutputFormat.setMultipartWriterFactory(MultipartWriterFactory)
  org.apache.axiom.soap.SOAPHeaderBlock.setMustUnderstand(String) Use `SOAPHeaderBlock.setMustUnderstand(boolean)` instead.
  org.apache.axiom.om.OMElement.setNamespaceWithNoFindInCurrentScope(OMNamespace) Use `OMNamedInformationItem.setNamespace(OMNamespace, boolean)` with `declare` set to `false`.
  org.apache.axiom.om.util.ElementHelper.setNewElement(OMElement, OMElement, OMElement)
  org.apache.axiom.soap.SOAPFaultNode.setNodeValue(String) This method conflicts with `Node.setNodeValue(String)` and will be removed in Axiom 1.3. Please use `SOAPFaultNode.setFaultNodeValue(String)` instead.
  org.apache.axiom.om.OMAttribute.setOMNamespace(OMNamespace) Use `OMNamedInformationItem.setNamespace(OMNamespace, boolean)` instead.
  org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeOptimized(OMText) Serialization code should use `XMLStreamWriterUtils.writeDataHandler(XMLStreamWriter, DataHandler, String, boolean)` or `XMLStreamWriterUtils.writeDataHandler(XMLStreamWriter, DataHandlerProvider, String, boolean)` to submit any binary content and let this writer decide whether the content should be written as base64 encoded character data or using `xop:Include`. If this is not possible, then `MTOMXMLStreamWriter.prepareDataHandler(DataHandler)` should be used.
  org.apache.axiom.om.util.ElementHelper.writeTextTo(OMElement, Writer, boolean) Use `OMElement.writeTextTo(Writer, boolean)` instead.

- Deprecated Constructors
  Constructor and Description
  org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder(XMLStreamReader, Attachments) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder(XMLStreamReader, Attachments, String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder(XMLStreamReader, SOAPFactory, Attachments, String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.StAXBuilder()
  org.apache.axiom.om.impl.builder.StAXBuilder(OMFactory, XMLStreamReader)
  org.apache.axiom.om.impl.builder.StAXBuilder(OMFactory, XMLStreamReader, String)
  org.apache.axiom.om.impl.builder.StAXBuilder(XMLStreamReader)
  org.apache.axiom.om.impl.builder.StAXOMBuilder()
  org.apache.axiom.om.impl.builder.StAXOMBuilder(InputStream) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.StAXOMBuilder(OMFactory, XMLStreamReader) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.StAXOMBuilder(OMFactory, XMLStreamReader, OMElement) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.StAXOMBuilder(String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.StAXOMBuilder(XMLStreamReader) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder(OMMetaFactory, XMLStreamReader) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder(OMMetaFactory, XMLStreamReader, String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder(XMLStreamReader) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder(XMLStreamReader, SOAPFactory, String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder(XMLStreamReader, String) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder(InputStream, Attachments) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder(OMFactory, XMLStreamReader, Attachments) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder(OMFactory, XMLStreamReader, OMElement, Attachments) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder(String, Attachments) Please use the `OMXMLBuilderFactory` API.
  org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder(XMLStreamReader, Attachments) Please use the `OMXMLBuilderFactory` API.

Copyright © The Apache Software Foundation. All Rights Reserved.