public class WsUtil
extends java.lang.Object
| Constructor and Description |
|---|
WsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
addAttachment(org.springframework.ws.context.MessageContext messageContext,
javax.activation.DataHandler attachmentHandler)
Method adds attachment to the context and returns generated content id of the attachment.
|
static java.io.InputStream |
base64Decode(java.io.InputStream stream)
Creates InputStream that will BASE64 decode the stream from input.
|
static java.io.InputStream |
base64DecodeIfNeededAndUnzip(javax.activation.DataHandler handler)
Method base64 decodes and unzips the handler's
InputStream. |
static javax.activation.DataHandler |
extractAttachment(org.springframework.ws.context.MessageContext messageContext,
java.lang.String attachmentContentId)
Method finds and returns
DataHandler of the attachment by attachment content id. |
static java.io.OutputStream |
getBase64EncodeStream(java.io.OutputStream stream)
Creates OutputStream that will BASE64 encode the stream from input.
|
static java.util.zip.GZIPOutputStream |
getGZipCompressStream(java.io.OutputStream stream)
Creates OutputStream that will GZIP compress the stream from input.
|
static java.io.InputStream |
gzipDecompress(java.io.InputStream stream)
Creates InputStream that will GZIP decompress the stream from input.
|
static java.lang.String |
readInput(java.io.InputStream fileStream)
Method reads inputstream into string.
|
static org.w3c.dom.Document |
xmlDocumentFromStream(java.io.InputStream objectStream)
Method parses and creates xml dom Document from inputstream.
|
public static java.io.InputStream gzipDecompress(java.io.InputStream stream)
throws ee.ria.dhx.exception.DhxException
stream - stream to decompressee.ria.dhx.exception.DhxException - thrown if error occurspublic static java.util.zip.GZIPOutputStream getGZipCompressStream(java.io.OutputStream stream)
throws ee.ria.dhx.exception.DhxException
stream - - stream to compressee.ria.dhx.exception.DhxException - thrown if error occurspublic static java.io.InputStream base64Decode(java.io.InputStream stream)
throws ee.ria.dhx.exception.DhxException
stream - - stream to decodeee.ria.dhx.exception.DhxException - thrown if error occurspublic static java.io.OutputStream getBase64EncodeStream(java.io.OutputStream stream)
throws ee.ria.dhx.exception.DhxException
stream - stream to encodeee.ria.dhx.exception.DhxException - thrown if error occurspublic static java.lang.String readInput(java.io.InputStream fileStream)
fileStream - stream to readInputStreampublic static org.w3c.dom.Document xmlDocumentFromStream(java.io.InputStream objectStream)
throws ee.ria.dhx.exception.DhxException
objectStream - - stream of the xml to parseee.ria.dhx.exception.DhxException - thrown if error occurspublic static java.io.InputStream base64DecodeIfNeededAndUnzip(javax.activation.DataHandler handler)
throws ee.ria.dhx.exception.DhxException
InputStream. If appears that handler's
InputStream is not base64 encoded, then is will be only unzipped.handler - handler which stream needs to be decoded and unzippedInputStreamee.ria.dhx.exception.DhxException - thrown if error occurs@Loggable
public static javax.activation.DataHandler extractAttachment(org.springframework.ws.context.MessageContext messageContext,
java.lang.String attachmentContentId)
throws ee.ria.dhx.exception.DhxException
DataHandler of the attachment by attachment content id.messageContext - context to search for attachmentattachmentContentId - content id of the attachment to findDataHandler of the found attachmentee.ria.dhx.exception.DhxException - thrown if error occurs@Loggable
public static java.lang.String addAttachment(org.springframework.ws.context.MessageContext messageContext,
javax.activation.DataHandler attachmentHandler)
throws ee.ria.dhx.exception.DhxException
messageContext - context to add attachment toattachmentHandler - DataHandler of the attachment to addee.ria.dhx.exception.DhxException - thrown if error occurs