Purpose of the xml namespace in the model

Topics: Service Factory Modeling Edition Forum
Feb 20, 2008 at 3:27 PM
I'm new to WCF web services and have been looking into the WSSF. When adding model elements like service contract and data contract I am prompted by the wizard to enter an xml namespace. I'm not exactly sure what this value is used for once the service is generated. The hands on lab provided a value to enter when prompted but did not explain its purpose. It appears that part of the namespace is used for versioning as there is a reference to a date that trails the end of the namespace.

I looked through the documentation and was not able to find any guidance on what the name is or best practices for how I should employ the namespace. If this is a basic question then a reference to some further reading would be much appreciated.
Developer
Feb 20, 2008 at 5:15 PM
Here your have a couple of links that will hopefully illustrate pretty well this topic:
http://xml.coverpages.org/namespaces.html
http://www.sitepoint.com/article/xml-namespaces-explained
Feb 21, 2008 at 1:33 PM
I understand the purpose of the namespace to uniquely identify elements. The part that was confusing me was the fact that the URI resembled a path, but the generated code did not create any items at that path. Is this the location where schema files should be stored? And doesn't the WSDL file supplant the need for a separate schema?

Another question I have is there any guidance for naming the URI? I take it that the naming used is important when versioning the web services.


charlyfriend wrote:
Here your have a couple of links that will hopefully illustrate pretty well this topic:
http://xml.coverpages.org/namespaces.html
http://www.sitepoint.com/article/xml-namespaces-explained

Developer
Feb 21, 2008 at 2:06 PM
Right, the path similarity is only for id and versioning purposes. I'm not an expert here so you can take a look into these articles:
  1. From Don's blog: http://blogs.msdn.com/donsmith/pages/VersioningWebServices.aspx
  2. Kinda dated but still valid: http://msdn2.microsoft.com/en-us/library/ms950793.aspx