Search in sources :

Example 1 with SoapAttachment

use of org.mule.runtime.extension.api.soap.SoapAttachment in project mule by mulesoft.

the class SoapOperationExecutor method toSoapAttachments.

private Map<String, SoapAttachment> toSoapAttachments(Map<String, TypedValue<?>> attachments) throws MessageTransformerException, TransformerException {
    Map<String, SoapAttachment> soapAttachmentMap = new HashMap<>();
    for (Map.Entry<String, TypedValue<?>> attachment : attachments.entrySet()) {
        SoapAttachment soapAttachment = new SoapAttachment(toInputStream(attachment.getValue()), attachment.getValue().getDataType().getMediaType());
        soapAttachmentMap.put(attachment.getKey(), soapAttachment);
    }
    return soapAttachmentMap;
}
Also used : SoapAttachment(org.mule.runtime.extension.api.soap.SoapAttachment) HashMap(java.util.HashMap) HashMap(java.util.HashMap) Map(java.util.Map) TypedValue(org.mule.runtime.api.metadata.TypedValue)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 TypedValue (org.mule.runtime.api.metadata.TypedValue)1 SoapAttachment (org.mule.runtime.extension.api.soap.SoapAttachment)1