Reputation: 465
I have to send a scheduled request to a SOAP web service with attachment (a zip) and metadata in the request . The data and file are prepared in a .NET compute node and a SOAP request node is made by a WSDL file. Unfortunately I do not know how I could pass the metadata and file to the SOAP request node from .NET compute node. The metadata is in the tag of the envelope, the uuid of the attachment is in the tag of the body. And the file goes into the attachment part.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tag="http://...."> <soap:Header> <tag:metadata> <tag:filename>filename</tag:filename> <tag:date>2018-06-01</tag:date> </tag:metadata> </soap:Header> <soap:Body> <tag:file> <tag:content>cid:4444444</tag:content> </tag:file> </soap:Body> </soap:Envelope>
Could someone help me, please?
Upvotes: 0
Views: 1227
Reputation: 1830
SOAP nodes support MTOM attachment handling, so IIB will take care of that automatically. The requirements are outlined in the IIB knowledge center:
An MTOM output message is written if all of the following criteria are met:
The Allow MTOM property is selected on the WS Extensions tab.
Validation is enabled. The Validate property on the SOAPRequest and SOAPAsyncRequest nodes controls validation of the anticipated response message and not validation of the outgoing request. MTOM output is therefore suppressed unless you set Validate to Content and value on a preceding input node or transformation node.
No child elements exist below SOAP.Attachment in the logical tree. If child elements are present, SOAP with Attachments (SwA) is used.
Elements exist in the output message that are identified as base64Binary in the associated XML Schema and whose length does not fall below a default threshold size of 1000 bytes.
https://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac56630_.htm
So you just put the binary data in your content element (provided that it has the correct type in the schema) as BLOB and configure the flow as above.
Upvotes: 1