IBM Integration Bus Web服务客户端请求

时间:2018-06-01 04:40:26

标签: soap-client messagebroker

我必须向SOAP Web服务发送一个计划请求,其中包含请求中的附件(zip)和元数据。数据和文件在.NET计算节点中准备,SOAP请求节点由WSDL文件生成。不幸的是,我不知道如何将元数据和文件从.NET计算节点传递到SOAP请求节点。元数据位于信封的 标记中,附件的uuid位于正文的 标记中。文件进入附件部分。

<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>

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:1)

SOAP节点支持MTOM附件处理,因此IIB会自动处理。 IIB知识中心概述了这些要求:

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

所以你只需将二进制数据放在内容元素中(前提是它在模式中具有正确的类型)作为BLOB并按上述方式配置流程。