Class MAPCodec

    • Field Detail

      • INSTANCE

        public static final MAPCodec INSTANCE
      • uncorrelatedExchanges

        protected final Map<String,​Exchange> uncorrelatedExchanges
        REVISIT: map usage that the *same* interceptor instance is used in all chains.
    • Constructor Detail

      • MAPCodec

        public MAPCodec()
        Constructor.
    • Method Detail

      • getInstance

        public static MAPCodec getInstance​(Bus bus)
      • getUncorrelatedExchanges

        public Map<String,​Exchange> getUncorrelatedExchanges()
      • handleMessage

        public void handleMessage​(SoapMessage message)
        Invoked for normal processing of inbound and outbound messages.
        Parameters:
        message - the messsage
      • unmarshalMAPs

        public AddressingProperties unmarshalMAPs​(SoapMessage message)
        Decode the MAPs from protocol-specific headers.
        Parameters:
        message - the SOAP message
        Returns:
        the decoded MAPs
        Throws:
        SOAPFaultException - if decoded MAPs are invalid
      • decodeAsNative

        public <T> T decodeAsNative​(String encodedAs,
                                    Class<T> clz,
                                    Element headerElement,
                                    javax.xml.bind.Unmarshaller unmarshaller)
                             throws javax.xml.bind.JAXBException
        Decodes a MAP from a exposed version.
        Parameters:
        encodedAs - specifies the encoded version
        clz - the class
        headerElement - the SOAP header element
        unmarshaller - the JAXB unmarshaller to use
        Returns:
        the decoded value
        Throws:
        javax.xml.bind.JAXBException
      • encodeMAP

        protected <T> void encodeMAP​(SoapMessage message,
                                     T value,
                                     QName qname,
                                     Class<T> clz,
                                     javax.xml.bind.JAXBContext ctx,
                                     boolean mustUnderstand)
                              throws javax.xml.bind.JAXBException
        Encodes an MAP as a SOAP header.
        Parameters:
        message - the message to store the headers on
        value - the value to encode
        qname - the QName for the header
        clz - the class
        ctx - the JAXBContent
        mustUnderstand -
        Throws:
        javax.xml.bind.JAXBException
      • decodeMAP

        protected <T> T decodeMAP​(Class<T> clz,
                                  Element headerElement,
                                  javax.xml.bind.Unmarshaller unmarshaller)
                           throws javax.xml.bind.JAXBException
        Decodes a MAP from a SOAP header.
        Parameters:
        clz - the class
        headerElement - the SOAP header element
        unmarshaller - the JAXB unmarshaller to use
        Returns:
        the decoded value
        Throws:
        javax.xml.bind.JAXBException