Class StAXSOAPModelBuilder

  • All Implemented Interfaces:
    OMXMLParserWrapper
    Direct Known Subclasses:
    MTOMStAXSOAPModelBuilder

    public class StAXSOAPModelBuilder
    extends StAXOMBuilder
    StAX based builder that produces a SOAP infoset model. It builds SOAP specific objects such as SOAPEnvelope, SOAPHeader, SOAPHeaderBlock and SOAPBody.

    This builder offers two different ways to handle SOAP versions:

    • Either the SOAP version is specified when the builder is constructed. If the specified version doesn't match the envelope namespace of the actual message, an exception is triggered. This approach should be used when the SOAP version is known from information other than the content of the message. For example, in the HTTP case it is possible to identify the SOAP version based on the Content-Type header.
    • If no SOAP version is specified, the builder will automatically detect it from the envelope namespace. It will then build the object model using the SOAPFactory implementation corresponding to that SOAP version.
    In both cases, the SOAPFactory is retrieved either from the OMMetaFactory specified when the builder is constructed, or if none is specified, from the default meta factory returned by OMAbstractFactory.getMetaFactory().
    • Constructor Detail

      • StAXSOAPModelBuilder

        public StAXSOAPModelBuilder​(XMLStreamReader parser,
                                    String soapVersion)
        Constructor.
        Parameters:
        parser - the parser to read the SOAP message from
        soapVersion - the namespace URI corresponding to the expected SOAP version of the message
      • StAXSOAPModelBuilder

        public StAXSOAPModelBuilder​(OMMetaFactory metaFactory,
                                    XMLStreamReader parser,
                                    String soapVersion)
        Constructor.
        Parameters:
        metaFactory - the meta factory used to get the appropriate SOAPFactory implementation
        parser - the parser to read the SOAP message from
        soapVersion - the namespace URI corresponding to the expected SOAP version of the message
      • StAXSOAPModelBuilder

        public StAXSOAPModelBuilder​(XMLStreamReader parser)
        Constructor.
        Parameters:
        parser - the parser to read the SOAP message from
      • StAXSOAPModelBuilder

        public StAXSOAPModelBuilder​(OMMetaFactory metaFactory,
                                    XMLStreamReader parser)
        Constructor.
        Parameters:
        metaFactory - the meta factory used to get the appropriate SOAPFactory implementation
        parser - the parser to read the SOAP message from
      • StAXSOAPModelBuilder

        public StAXSOAPModelBuilder​(XMLStreamReader parser,
                                    SOAPFactory factory,
                                    String soapVersion)
        Constructor.
        Parameters:
        parser - the parser to read the SOAP message from
        factory - the SOAP factory to use
        soapVersion - the namespace URI corresponding to the expected SOAP version of the message
    • Method Detail

      • identifySOAPVersion

        protected void identifySOAPVersion​(String soapVersionURIFromTransport)
        Parameters:
        soapVersionURIFromTransport -
      • createNextOMElement

        protected OMNode createNextOMElement()
        Description copied from class: StAXOMBuilder
        Creates a new OMElement using either a CustomBuilder or the default Builder mechanism.
        Overrides:
        createNextOMElement in class StAXOMBuilder
        Returns:
        TODO
      • setSOAPEnvelope

        protected void setSOAPEnvelope​(OMElement node)
      • constructNode

        protected OMElement constructNode​(OMElement parent,
                                          String elementName,
                                          boolean isEnvelope)
        Method constructNode
        Parameters:
        parent -
        elementName -
        isEnvelope -
      • processNamespaceData

        protected void processNamespaceData​(OMElement node,
                                            boolean isSOAPElement)
        Method processNamespaceData.
        Parameters:
        node -
        isSOAPElement -
      • getEnvelopeNamespace

        public OMNamespace getEnvelopeNamespace()
      • isProcessingDetailElements

        public boolean isProcessingDetailElements()
      • setProcessingDetailElements

        public void setProcessingDetailElements​(boolean value)
      • getSoapFactory

        protected SOAPFactory getSoapFactory()
        Returns:
        Returns the soapFactory.