public final class MtomRequestEnricher extends AttachmentRequestEnricher
AttachmentRequestEnricher implementation for clients that works with MTOM.| Constructor and Description |
|---|
MtomRequestEnricher() |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
createAttachmentNode(Document bodyDocument,
String name,
SoapAttachment attachment)
Creates the content of the attachment node to be added in the SOAP request
|
enrichRequest, getAttachmentPlaceholderNodeprotected Node createAttachmentNode(Document bodyDocument, String name, SoapAttachment attachment)
Creates the XOP element to the attachment node this way the attachments gets tracked with its CID (content id) when it's sent in the multipart request.
Basically creates this content
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:attachmentContentId"/> and uses the
attachmentContentId to identify the attachment in the multipart.
bodyDocument - the document where we are adding the node element.attachment - the attachment to be sent.Copyright © 2019. All rights reserved.