Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ohf.ihe.atna.transport
Class SoapSerializer

    java.lang.Object
      org.eclipse.ohf.ihe.atna.transport.SoapSerializer

    public class SoapSerializer

extends java.lang.Object

Utility class to serialize a SOAP 1.1 or SOAP 1.2 message with or without attachments into a properly formed byte array for sending over an HTTP socket. If the message contains attachments, then the SOAP message and associated attachments are converted to a MIME message conforming to the SWA specification.

Author:
  Matthew Davis

Constructor Summary
`SoapSerializer(javax.xml.soap.SOAPMessage msg)` Initializes the SOAP serializer for the given message

Method Summary
`java.lang.String` | `getMessageBoundary()` Gets the MIME boundary string for use when creating a MIME message.
`java.lang.String` | `getMessageStart()` Gets the string that corresponds to the content-id of the first attachment in the MIME message.
`byte[]` | `serialize()` Serializes the associated SOAP message into a byte array for sending over HTTP.
`byte[]` | `serializeWithAttachments()` Serializes the associated SOAP message with attachments for sending over HTTP.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SoapSerializer

    public SoapSerializer(javax.xml.soap.SOAPMessage msg)

  Initializes the SOAP serializer for the given message

  Parameters:
    `msg` - The SOAP message to serialize

Method Detail

### getMessageBoundary

    public java.lang.String getMessageBoundary()

  Gets the MIME boundary string for use when creating a MIME message.

  Returns:
    The corresponding MIME boundary

### getMessageStart

    public java.lang.String getMessageStart()

  Gets the string that corresponds to the content-id of the first attachment in the MIME message.

  Returns:
    The message start content-id

### serialize

    public byte[] serialize()
                     throws java.lang.Exception

  Serializes the associated SOAP message into a byte array for sending over HTTP.

  Returns:
    The serialized SOAP message (with attachments)
  Throws:
    `java.lang.Exception`

### serializeWithAttachments

    public byte[] serializeWithAttachments()
                                    throws java.lang.Exception

  Serializes the associated SOAP message with attachments for sending over HTTP.

  Returns:
    The serialized SOAP message (with attachments)
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD