Class SAAJConverterImpl

java.lang.Object
org.apache.axis2.jaxws.message.util.impl.SAAJConverterImpl
All Implemented Interfaces:
SAAJConverter

public class SAAJConverterImpl extends Object implements SAAJConverter
SAAJConverterImpl Provides an conversion methods between OM<->SAAJ
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    A Name can be created from either a SOAPEnvelope or SOAPFactory.
  • Field Summary

    Fields inherited from interface org.apache.axis2.jaxws.message.util.SAAJConverter

    OM_ATTRIBUTE_KEY
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAttributes(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader)
    add attributes
    protected jakarta.xml.soap.SOAPElement
    buildSOAPTree(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement root, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader, boolean quitAtBody)
    Build SOAPTree Either the root or the parent is null.
    protected jakarta.xml.soap.SOAPElement
    createElement(jakarta.xml.soap.SOAPElement parent, QName qName)
    Create child SOAPElement
    protected jakarta.xml.soap.SOAPElement
    createElementFromTag(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader)
    Create SOAPElement from the current tag data
    jakarta.xml.soap.MessageFactory
    Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.
    org.apache.axiom.om.OMElement
    toOM(jakarta.xml.soap.SOAPElement soapElement)
    Convert SOAPElement into an OMElement
    org.apache.axiom.soap.SOAPEnvelope
    toOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope)
    Convert SAAJ SOAPEnvelope to OM SOAPEnvelope
    org.apache.axiom.soap.SOAPEnvelope
    toOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments)
    Convert SAAJ SOAPEnvelope to OM SOAPEnvelope
    jakarta.xml.soap.SOAPElement
    toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent)
    Convert omElement into a SOAPElement and add it to the parent SOAPElement.
    jakarta.xml.soap.SOAPElement
    toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent, jakarta.xml.soap.SOAPFactory sf)
    Convert omElement into a SOAPElement and add it to the parent SOAPElement.
    jakarta.xml.soap.SOAPEnvelope
    toSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope)
    Convert OM SOAPEnvleope to SAAJ SOAPEnvelope
    protected void
    updateTagData(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader, boolean newElement)
    update the tag data of the SOAPElement

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toSAAJ

      public jakarta.xml.soap.SOAPEnvelope toSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope) throws jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Convert OM SOAPEnvleope to SAAJ SOAPEnvelope
      Specified by:
      toSAAJ in interface SAAJConverter
      Returns:
      SOAPEnvelope
      Throws:
      jakarta.xml.ws.WebServiceException
    • toOM

      public org.apache.axiom.soap.SOAPEnvelope toOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope)
      Description copied from interface: SAAJConverter
      Convert SAAJ SOAPEnvelope to OM SOAPEnvelope
      Specified by:
      toOM in interface SAAJConverter
      Returns:
      OM Envelope
    • toOM

      public org.apache.axiom.soap.SOAPEnvelope toOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments) throws jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Convert SAAJ SOAPEnvelope to OM SOAPEnvelope
      Specified by:
      toOM in interface SAAJConverter
      Returns:
      OM Envelope
      Throws:
      jakarta.xml.ws.WebServiceException
    • toOM

      public org.apache.axiom.om.OMElement toOM(jakarta.xml.soap.SOAPElement soapElement) throws jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Convert SOAPElement into an OMElement
      Specified by:
      toOM in interface SAAJConverter
      Returns:
      OMElement
      Throws:
      jakarta.xml.ws.WebServiceException
    • toSAAJ

      public jakarta.xml.soap.SOAPElement toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent) throws jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Convert omElement into a SOAPElement and add it to the parent SOAPElement. This method requires that the parent element have an ancestor that is a SOAPEnvelope. If this is not the case use the toSAAJ(OMElement, SOAPElement, SOAPFactory) method
      Specified by:
      toSAAJ in interface SAAJConverter
      parent - SOAPElement
      Returns:
      SOAPElement that was added to the parent.
      Throws:
      jakarta.xml.ws.WebServiceException
      See Also:
    • toSAAJ

      public jakarta.xml.soap.SOAPElement toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent, jakarta.xml.soap.SOAPFactory sf) throws jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Convert omElement into a SOAPElement and add it to the parent SOAPElement.
      Specified by:
      toSAAJ in interface SAAJConverter
      parent - SOAPElement
      sf - SOAPFactory that is used to create Name objects
      Returns:
      SOAPElement that was added to the parent.
      Throws:
      jakarta.xml.ws.WebServiceException - * @see toSAAJ(OMElement, SOAPElement)
    • buildSOAPTree

      protected jakarta.xml.soap.SOAPElement buildSOAPTree(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement root, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader, boolean quitAtBody) throws jakarta.xml.ws.WebServiceException
      Build SOAPTree Either the root or the parent is null. If the root is null, a new element is created under the parent using information from the reader If the parent is null, the existing root is updated with the information from the reader
      Parameters:
      nc - NameCreator
      root - SOAPElement (the element that represents the data in the reader)
      parent - (the parent of the element represented by the reader)
      reader - XMLStreamReader. the first START_ELEMENT matches the root
      quitAtBody - - true if quit reading after the body START_ELEMENT
      Throws:
      jakarta.xml.ws.WebServiceException
    • createElementFromTag

      protected jakarta.xml.soap.SOAPElement createElementFromTag(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader) throws jakarta.xml.soap.SOAPException
      Create SOAPElement from the current tag data
      Parameters:
      nc - NameCreator
      parent - SOAPElement for the new SOAPElement
      reader - XMLStreamReader whose cursor is at the START_ELEMENT
      Returns:
      Throws:
      jakarta.xml.soap.SOAPException
    • createElement

      protected jakarta.xml.soap.SOAPElement createElement(jakarta.xml.soap.SOAPElement parent, QName qName) throws jakarta.xml.soap.SOAPException
      Create child SOAPElement
      Parameters:
      parent - SOAPElement
      name - Name
      Returns:
      Throws:
      jakarta.xml.soap.SOAPException
    • updateTagData

      protected void updateTagData(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader, boolean newElement) throws jakarta.xml.soap.SOAPException
      update the tag data of the SOAPElement
      Parameters:
      NameCreator - nc
      element - SOAPElement
      reader - XMLStreamReader whose cursor is at START_ELEMENT
      Throws:
      jakarta.xml.soap.SOAPException
    • addAttributes

      protected void addAttributes(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader) throws jakarta.xml.soap.SOAPException
      add attributes
      Parameters:
      NameCreator - nc
      element - SOAPElement which is the target of the new attributes
      reader - XMLStreamReader whose cursor is at START_ELEMENT
      Throws:
      jakarta.xml.soap.SOAPException
    • createMessageFactory

      public jakarta.xml.soap.MessageFactory createMessageFactory(String namespace) throws jakarta.xml.soap.SOAPException, jakarta.xml.ws.WebServiceException
      Description copied from interface: SAAJConverter
      Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.
      Specified by:
      createMessageFactory in interface SAAJConverter
      Returns:
      Throws:
      jakarta.xml.ws.WebServiceException - if the namespace is SOAP 1.2 and the SAAJ does not support SOAP 1.2 or the namespace is unknown.
      jakarta.xml.soap.SOAPException