简体   繁体   English

在Wcf自定义发送端口上生成SOAP操作标头

[英]Generating SOAP Action Header on Wcf-Custom Send Port

I am in the process of creating a Send Port in Biztalk, that uses the Wcf-Custom adapter for sending SOAP requests. 我正在Biztalk中创建发送端口,该端口使用Wcf-Custom适配器发送SOAP请求。

So far I have been testing the SOAP requests in Visual Studio, using C# code from the System-ServiceModel namespace. 到目前为止,我一直在使用System-ServiceModel命名空间中的C#代码在Visual Studio中测试SOAP请求。 See code below: 参见下面的代码:

/ CODEGEN: Generating message contract since the operation transferPayments is neither RPC nor document wrapped.
    [System.ServiceModel.OperationContractAttribute(Action="urn:CorporateService:transferPayment", ReplyAction="*")]
    [System.ServiceModel.XmlSerializerFormatAttribute()]
    transferPaymentsResponse transferPayments(transferPayment1 request);

    [System.ServiceModel.OperationContractAttribute(Action="urn:CorporateService:transferPayment", ReplyAction="*")]
    System.Threading.Tasks.Task<transferPaymentsResponse> transferPaymentsAsync(transferPayment1 request);

I need to add this "transferPayment" action to the SOAP Action Header field in the adapter. 我需要将此“ transferPayment”操作添加到适配器的SOAP操作标头字段中。

在此处输入图片说明

Using the provided example, I've come up with this 使用提供的示例,我想出了这个

<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
<Operation Name="TransferPayment" Action="http://bankconnect.dk/schema/2014/CorporateService/TransferPayment" />  
</BtsActionMapping>

Where " http://bankconnect.dk/schema/2014 " is the namespace, "CorporateService" is the service, and "TransferPayment" is the action. 其中“ http://bankconnect.dk/schema/2014 ”是名称空间,“ CorporateService”是服务,“ TransferPayment”是操作。 I'm unsure if this is the correct way to go about implementing this. 我不确定这是否是实现此目标的正确方法。

My question how I should format the SOAP Action Headers, so that they correspond to the c# code used. 我的问题是我应该如何格式化SOAP Action Headers,以便它们对应于所使用的c#代码。

I'd suggest you use the BizTalk WCF Service Consume Wizard to generate the schema's inside BizTalk. 我建议您使用BizTalk WCF Service Consume Wizard使用BizTalk WCF Service Consume Wizard在BizTalk内部生成架构。 This would make all the possible Actions for you. 这将为您执行所有可能的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM