In WCF, is there a way to omit / hide a ServiceOperation or a DataMember from the WSDL?

前端 未结 2 1446
孤街浪徒
孤街浪徒 2021-01-13 11:48

I have an existing WCF service. At some point, sometimes an [OperationContract] or a [DataMember] in a data contract becomes [Obsolete]

2条回答
  •  猫巷女王i
    2021-01-13 11:58

    There isn't anything out-of-the-box which can be used to do that, but you can use a WSDL export extension to remove some of the operations from the service metadata. I implemented a sample for this scenario at http://blogs.msdn.com/b/carlosfigueira/archive/2011/10/06/wcf-extensibility-wsdl-export-extension.aspx.

提交回复
热议问题