[英]Generating SOAP Action Header on Wcf-Custom Send Port
我正在Biztalk中创建发送端口,该端口使用Wcf-Custom适配器发送SOAP请求。
到目前为止,我一直在使用System-ServiceModel命名空间中的C#代码在Visual Studio中测试SOAP请求。 参见下面的代码:
/ 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);
我需要将此“ transferPayment”操作添加到适配器的SOAP操作标头字段中。
使用提供的示例,我想出了这个
<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>
其中“ http://bankconnect.dk/schema/2014 ”是名称空间,“ CorporateService”是服务,“ TransferPayment”是操作。 我不确定这是否是实现此目标的正确方法。
我的问题是我应该如何格式化SOAP Action Headers,以便它们对应于所使用的c#代码。
我建议您使用BizTalk WCF Service Consume Wizard
使用BizTalk WCF Service Consume Wizard
在BizTalk内部生成架构。 这将为您执行所有可能的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.