【问题标题】:WCF ReplyAction="*" breaks metadataWCF ReplyAction="*" 破坏元数据
【发布时间】:2010-11-19 11:25:14
【问题描述】:

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

[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);
}

如果需要,完整的服务代码在WCF metadata missing operations。

【问题讨论】:

    标签: c# .net wcf web-services metadata


    【解决方案1】:

    为 OperationContract 设置 ReplyAction="*" 意味着 WsdlExporter(发布元数据)将忽略该操作。设置任何其他值都会修复它。

    【讨论】:

    • 您也可以完全删除该属性,这应该仍然有效。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-14
    • 2012-02-01
    • 2011-05-11
    • 2015-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多