C# WCF ReplyAction="*&引用;中断元数据

C# WCF ReplyAction="*&引用;中断元数据,c#,.net,wcf,web-services,metadata,C#,.net,Wcf,Web Services,Metadata,以下协定不会在元数据中生成操作,但是如果我删除回复操作或将其设置为“”,元数据现在会正确生成操作。为什么? [System.ServiceModel.ServiceContractAttribute(Namespace="http://Test/Publish", ConfigurationName="IFCRPublish")] public interface IFCRPublish { // CODEGEN: Generating message contract since t

以下协定不会在元数据中生成操作,但是如果我删除回复操作或将其设置为“”,元数据现在会正确生成操作。为什么?

[System.ServiceModel.ServiceContractAttribute(Namespace="http://Test/Publish", ConfigurationName="IFCRPublish")]
public interface IFCRPublish
{

    // CODEGEN: Generating message contract since the operation PublishNotification is neither RPC nor document wrapped.
    [System.ServiceModel.OperationContractAttribute(Action="http://Test/PublishNotification", ReplyAction="*")]
    PublishNotificationResponse1 PublishNotification(PublishNotificationRequest1 request);
}

如果需要,则完整服务代码位于中。

设置OperationContract的ReplyAction=“*”表示WsdlExporter(发布元数据)将忽略该操作。设置任何其他值都可以解决此问题。

您也可以完全删除该属性,这应该仍然有效。