有没有办法更改 WCF ServiceContract 接口的 .NET 命名空间,但仍使 WCF 服务与使用旧的(除了命名空间相同)ServiceContract 的客户端向后兼容?例如,假设我有(在 vb.net 中):
Namespace MyCompany.MyPoorlyNamedProject
<ServiceContract(Name:="ThingService")> _
<CLSCompliant(True)> _
Public Interface IThingService
...
End Interface
EndNamespace
我想把它改成
Namespace MyCompany.MyProject
<ServiceContract(Name:="ThingService")> _
<CLSCompliant(True)> _
Public Interface IThingService
...
End Interface
End Namespace
根本不改变服务。
我尝试这样做,但是从 wsdl 引用的我的 xsd 显示了新的命名空间名称,这似乎是不兼容的。
有任何想法吗?