很简单……ServiceBehaviour
的命名空间对于 Web 服务版本控制很重要吗?这意味着为了客户端与服务器的前向/后向兼容性,此名称空间是否以任何方式涉及?
我真的不明白这个特定的命名空间是什么以及它的用途。有人可以告诉我这个吗?
谢谢你!
EDIT1:经过我的调查,此名称空间出现在 WSDL 中的第一行中: ...但我不知道这是否会影响版本控制...也许我是盲目的或错过了一些东西。或者也许我太担心了......为什么我要在这里添加一些日期(< /代码>) ?
EDIT2:我找到了此链接,但指向另一个不再可用的位置:http://social.msdn.microsoft.com/Forums/en/wcf/thread/66c19783-6675-4bd7-83c1-2140d00a943e 。有人可以帮忙吗?
Simple, as that... is the ServiceBehaviour
's namespace important for web service versioning? Meaning that for forward/backward compatibility of clients to server is this namespace involved in any way?
I really didn't understand what is this specific namespace and its use. Could anybody enlighting me about this?
Thank you!
EDIT1: After my investigations this namespace appears in WSDL here in the first line: <wsdl:definitions name="SvcTest" targetNamespace="api.company.com/Services/Tester">
...but I don't see if this would influence or not the versioning... maybe I am blind or miss something. Or maybe I am too worried... why would I add some date here (<wsdl:definitions name="SvcTest" targetNamespace="api.company.com/Services/Tester/2012/01">
) ?
EDIT2: I found this link, but is pointing to another location which is not available anymore: http://social.msdn.microsoft.com/Forums/en/wcf/thread/66c19783-6675-4bd7-83c1-2140d00a943e . Could anyone help?
发布评论
评论(1)
是的,经过一番阅读后……
微软建议使用命名空间来版本数据契约。请参阅最佳实践:数据合同版本控制
命名空间可以在多个位置设置(ServiceContractAttribute、ServiceBehaviorAttribute、DataContractAttribute,请参阅 WCF 服务命名空间)。
在 WSDL 中拥有一致的名称空间并跟踪契约、行为或数据契约的更改似乎很重要。
Yes, after some reading ...
Microsoft recommends using the namespace to version data contracts. See Best Practices: Data Contract Versioning
The namespace can be set in various places (ServiceContractAttribute, ServiceBehaviorAttribute, DataContractAttribute, see WCF service namespaces).
To have a consistent namespace in the WSDL and to keep track of changes to the contract, behavior or data contract it seems important.