MessageTransformer (Message Queue, 5.1 API Specification)
Date: 2019-01-27

com.sun.messaging.xml

## Class MessageTransformer

- java.lang.Object
- - com.sun.messaging.xml.MessageTransformer

-     public class MessageTransformer
      extends java.lang.Object

  The `Transformer` class encapsulates the functionality to transform SOAP and JMS messages.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.xml.soap.SOAPMessage` | `SOAPMessageFromJMSMessage(javax.jms.Message message, javax.xml.soap.MessageFactory messageFactory)` Extracts a `javax.xml.soap.SOAPMessage` object from the `javax.jms.Message` object into which it was transformed using the `SOAPMessageIntoJMSMessage` method.
    `static javax.jms.Message` | `SOAPMessageIntoJMSMessage(javax.xml.soap.SOAPMessage soapMessage, javax.jms.Session session)` Transforms a `javax.xml.soap.SOAPMessage` message into a `javax.jms.Message` message.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### SOAPMessageIntoJMSMessage

          public static javax.jms.Message SOAPMessageIntoJMSMessage(javax.xml.soap.SOAPMessage soapMessage,
                                                                    javax.jms.Session session)
                                                             throws JAXMException

      Transforms a `javax.xml.soap.SOAPMessage` message into a `javax.jms.Message` message.
      Parameters:
        `soapMessage` - the SOAPMessage to be converted to the JMS Message.
        `session` - The JMS Session to be used to construct the JMS Message.
      Throws:
        `JAXMException` - If any error is encountered when transforming the message.

    - #### SOAPMessageFromJMSMessage

          public static javax.xml.soap.SOAPMessage SOAPMessageFromJMSMessage(javax.jms.Message message,
                                                                             javax.xml.soap.MessageFactory messageFactory)
                                                                      throws JAXMException

      Extracts a `javax.xml.soap.SOAPMessage` object from the `javax.jms.Message` object into which it was transformed using the `SOAPMessageIntoJMSMessage` method. The `MessageFactory` parameter is used to construct the `javax.xml.soap.SOAPMessage` object.

      If `MessageFactory` is `null` then the default SOAP MessageFactory will be used to construct the SOAP message.

      Parameters:
        `message` - The JMS message from which the SOAP message is to be extracted.
        `messageFactory` - The SOAP MessageFactory to be used to contruct the SOAP message.
      Throws:
        `JAXMException` - If any error is encountered when extracting the message.

Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.