Is the ServiceBehaviour's namespace important for web service versioning?

1.8k views Asked by At

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

There are 1 answers

3
robor On

Yes, after some reading ...

Microsoft recommends using the namespace to version data contracts. See Best Practices: Data Contract Versioning

Although in these examples names are changed (by appending a "2"), the recommendation is to change namespaces instead of names by appending new namespaces with a version number or a date. For example, the http://schemas.contoso.com/2005/05/21/PurchaseOrder data contract would change to the http://schemas.contoso.com/2005/10/14/PurchaseOrder data contract.

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.