如何指定自定义SOAPACTION的WCF自定义、SOAPACTION、WCF

由网友(我就是王道)分享简介:我创建这将是从其他服务称为WCF服务。I am creating a WCF service which will be called from another service.在WSDL的SOAPAction是出现如下:In the WSDL soapaction is appearing as follows...

我创建这将是从其他服务称为WCF服务。

I am creating a WCF service which will be called from another service.

在WSDL的SOAPAction是出现如下:

In the WSDL soapaction is appearing as follows

<soap12:operation soapAction="http://tempuri.org/ISubscriptionEvents/MyMethod" style="document" />

我想这是

<soap12:operation soapAction="http://www.TextXYZ.com/FUNC/1/0/action/MyMethod" style="document" />

我如何指定自定义SOAP操作?

How can I specify the custom soap action?

推荐答案

您可以在服务合同定义中指定的:

You could specify it in the service contract definition:

[ServiceContract(Namespace = "http://www.TextXYZ.com/FUNC/1/0/action")]
public interface IMyServiceContract
{
    [OperationContract]
    void MyMethod();
}
阅读全文

相关推荐

最新文章