Web services 将soap头添加到BizTalk soap适配器

Web services 将soap头添加到BizTalk soap适配器,web-services,soap,adapter,biztalk,Web Services,Soap,Adapter,Biztalk,我们有如下webservice xml请求。为此,我开发了编排。但是,当我们向客户端发送请求时,我们需要添加SOAP头。 你能建议我怎么做吗 Web服务XML请求 <?xml version="1.0" encoding="utf-8" ?> <Request xmlns="http://modeler.ass.abc/efgh/"> <HeaderReq> <PartnerID>E0</PartnerID> <

我们有如下webservice xml请求。为此,我开发了编排。但是,当我们向客户端发送请求时,我们需要添加SOAP头。
你能建议我怎么做吗

Web服务XML请求

<?xml version="1.0" encoding="utf-8" ?>
<Request xmlns="http://modeler.ass.abc/efgh/">
  <HeaderReq>
    <PartnerID>E0</PartnerID>
    <TimeStampSubmitted>2013-11-21T18:19:11</TimeStampSubmitted>
    <Version>3.0</Version>
  </HeaderReq>
  <ApplicationREQ>
    <ID>1</ID>
  </ApplicationREQ>
</Request>

E0
2013-11-21T18:19:11
3
1.
SOAP头

<soapenv:Header>
  <wsse:Security xmlns:wsse="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-wssecurity-secext-1.0.xsd">
    <wsu:Timestamp wsu:Id="TS-10">
      <wsu:Created>2013-10-11T17:26:52.890Z</wsu:Created>
      <wsu:Expires>2013-10-11T17:51:52.890Z</wsu:Expires>
    </wsu:Timestamp>
    <wsse:UsernameToken wsu:Id="UsernameToken-10">
      <wsse:Username>User</wsse:Username>
      <wsse:Password Type="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-username-token-profile-1.0#PasswordText">xxxxxxx</wsse:Password>
      <wsse:Nonce EncodingType="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-soap-message-security-1.0#Base64Binary">xxxxxxx</wsse:Nonce>
      <wsu:Created>2013-10-11T17:26:52.889Z</wsu:Created>
    </wsse:UsernameToken>
  </wsse:Security>
</soapenv:Header>

2013-10-11T17:26:52.890Z
2013-10-11T17:51:52.890Z
使用者
xxxxxxx
xxxxxxx
2013-10-11T17:26:52.889Z

您需要使用属性WCF.OutboundCustomHeaders

例如:

xmlDoc.LoadXml("<headers><Origination>Home</Origination><Destination>Work</Destination></headers>");
我在本页找到了以下示例:


希望这有帮助

对于这种类型,我的reuqest消息、请求消息(如msgClient.MessagePart1)有问题。因此,msgClient.MessagePart1不接受属性WCF.OutboundCustomHeaders。你知道怎么做吗?@OverflowUser我想这是一条由多部分组成的消息?我已经用单部分消息成功地做到了这一点,但我自己还没有用多部分消息尝试过这一点。您是否尝试过更新您的端口以使用单部分消息?Hi@OverflowUser,不幸的是,代码归我的客户机所有,但原则保持不变。这是我在这里找到的另一个例子:基本上:在多部分消息上设置上下文,而不是在部分本身上。
RequestMessageInstance(WCF.OutboundCustomHeaders) = xmlDoc.OuterXml;