public abstract class MtomUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MIME_TYPE |
static java.lang.String |
MIME_TRANSFER_ENC_HEADER |
static javax.xml.namespace.QName |
XOP_INCLUDE_QNAME |
Constructor and Description |
---|
MtomUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addMtomAttachment(javax.xml.soap.SOAPMessage soapMessage,
byte[] octects,
java.lang.String cid)
Add a mtom attachment to soapMessage
|
static int |
calculateRawBytesLength(int strLen) |
static javax.xml.soap.SOAPElement |
getCipherValueFromEncryptedData(javax.xml.soap.SOAPElement encryptedDataElement)
Get CipherValue Element from EncryptedData Element.
|
static java.lang.String |
getMTOMcid(javax.xml.namespace.QName elementName)
The CID is supposed to be: name of the corresponding WSDL message part +
"=" + a UUID + "@" + a valid domain name.
|
static boolean |
isValidNode(org.w3c.dom.Node envelopeNode,
org.w3c.dom.Node node)
If the target node is still valid, one of its parent would be envelope node
|
static void |
replaceContentWithIncludeElement(javax.xml.soap.SOAPMessage soapMessage,
byte[] octects,
javax.xml.soap.SOAPElement parentElement) |
static void |
replaceContentWithIncludeElement(javax.xml.soap.SOAPMessage soapMessage,
javax.xml.soap.SOAPElement parentElement)
Replace the content of element with XOP Include Element and add a attachment to
|
static void |
writeHref(javax.xml.soap.SOAPMessage message,
javax.xml.soap.SOAPElement element,
java.lang.String cid)
Add href attribute to a SOAPElement.
|
public static final java.lang.String MIME_TRANSFER_ENC_HEADER
public static final java.lang.String DEFAULT_MIME_TYPE
public static final javax.xml.namespace.QName XOP_INCLUDE_QNAME
public static java.lang.String getMTOMcid(javax.xml.namespace.QName elementName)
elementName
- public static void writeHref(javax.xml.soap.SOAPMessage message, javax.xml.soap.SOAPElement element, java.lang.String cid) throws com.bea.xml.XmlException
message
- element
- cid
- com.bea.xml.XmlException
public static boolean isValidNode(org.w3c.dom.Node envelopeNode, org.w3c.dom.Node node)
envelopeNode
- node
- public static javax.xml.soap.SOAPElement getCipherValueFromEncryptedData(javax.xml.soap.SOAPElement encryptedDataElement) throws com.bea.xml.XmlException
encryptedDataElement
- com.bea.xml.XmlException
- if could not found CipherData Element or DOM process error occurspublic static void addMtomAttachment(javax.xml.soap.SOAPMessage soapMessage, byte[] octects, java.lang.String cid) throws com.bea.xml.XmlException
soapMessage
- octects
- cid
- the content-id for this attachmentcom.bea.xml.XmlException
public static void replaceContentWithIncludeElement(javax.xml.soap.SOAPMessage soapMessage, javax.xml.soap.SOAPElement parentElement) throws com.bea.xml.XmlException
parentElement
- com.bea.xml.XmlException
public static void replaceContentWithIncludeElement(javax.xml.soap.SOAPMessage soapMessage, byte[] octects, javax.xml.soap.SOAPElement parentElement) throws com.bea.xml.XmlException
soapMessage
- octects
- parentElement
- com.bea.xml.XmlException
public static int calculateRawBytesLength(int strLen)
strLen
-