2

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?

Learner
  • 3,297
  • 4
  • 37
  • 62
  • 2
    I agree it is rude to downvote without leaving any comment – tom redfern Jan 12 '12 at 15:30
  • 1
    Thanks for your sympathy hugh :) – Learner Jan 12 '12 at 15:39
  • Why not try changing the namespace and see if this changes the resulting WSDL? Be sure to use wsHttpBinding to maximize the complexity of the WSDL (to give a larger set of elements to possibly be changed by changing the namespace). – John Saunders Jan 12 '12 at 19:49
  • @John thanks for your suggestions... I need to keep it to basicHttpBinding for now, as about how this affects the WSDL, I noticed only this first line where it appears: '' – Learner Jan 13 '12 at 09:37
  • I meant changing the binding as part of the experiment. BTW, the target namespace affects _everything_ in the WSDL. Anything with `name="x"` is really "x in _targetNamespace_" – John Saunders Jan 13 '12 at 11:04
  • Maybe I am worried if I should have something like a date inside there as well or not. 'targetNamespace="api.company.com/Services/Tester/2010/01" ' – Learner Jan 13 '12 at 11:50

1 Answers1

1

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.

robor
  • 2,969
  • 2
  • 31
  • 48
  • although this is a good link, does not say anything about service behavior's namespace – Learner Oct 28 '13 at 14:11
  • Sorry, you're right. I was a little too quick and did not fully read your question. I've editted the reply. – robor Oct 28 '13 at 15:00
  • Yes, indeed it seems to be important, although is difficult to comprehend how exactly... – Learner Oct 29 '13 at 13:17