【发布时间】:2014-12-12 02:35:57
【问题描述】:
我想将 MessageHeaderAttribute 添加到其他端点已经在使用的 WCF 端点。添加一个可为空的属性(如字符串)会破坏其他消费者的端点吗?
具体来说,其他消费者是否需要更新服务合同?如果他们的端点定义缺少此属性,是否会中断他们的服务?
所以,有些消费者不知道 ActionType 属性已添加到合同中。这些消费者还能消费吗?
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
System.ServiceModel.MessageContractAttribute(WrapperName:="UploadFileMessage", WrapperNamespace:="http://...", IsWrapped:=True)> _
Partial Public Class UploadFileMessage
<System.ServiceModel.MessageHeaderAttribute([Namespace]:="http://...")> _
Public DocumentId As String
<System.ServiceModel.MessageHeaderAttribute([Namespace]:="http://....")> _
Public ActionType As String
【问题讨论】: