.NET Framework Developer Center >
.NET Development Forums
>
ASMX Web Services and XML Serialization
>
Question about web services namespace
Question about web services namespace
- Dear all,
I am new to web services. I can create a simple asp.net web service. However, I am not so clear about the meaning of namespace of web services. Is it used to describe the function of the web services? or is it only a name which is unique for the web service and does not have any meaning? If the namespace can be used to describe the function of the web services, should I create a xml for this?
Thanks,
Ray
Answers
- hi,Ray
in my opinion,namespace in xml is similar to the namespace in .Net
namespace can be used to identify a class in .Net;it can also be used to identify an element in xml.
see: http://www.xml.com/pub/a/1999/01/namespaces.html
Wenn ich dich hab’,gibt es nichts, was unerträglich ist.坚持不懈!http://blog.tanging.net- Marked As Answer byRAYSW Monday, October 19, 2009 2:49 PM
- Proposed As Answer byLucian BaciuModeratorMonday, October 19, 2009 9:36 AM
All Replies
- hi,Ray
in my opinion,namespace in xml is similar to the namespace in .Net
namespace can be used to identify a class in .Net;it can also be used to identify an element in xml.
see: http://www.xml.com/pub/a/1999/01/namespaces.html
Wenn ich dich hab’,gibt es nichts, was unerträglich ist.坚持不懈!http://blog.tanging.net- Marked As Answer byRAYSW Monday, October 19, 2009 2:49 PM
- Proposed As Answer byLucian BaciuModeratorMonday, October 19, 2009 9:36 AM
- Hi, Raymond,
Thanks. After reading the passage, I get that namespace is unique and only used to identify the web services. Although it is in URL format, there is nothing in the URL specified. Is it true?
Thanks for your help,
Ray - yes,you are right; the namespace url has no specified meaning at all
Wenn ich dich hab’,gibt es nichts, was unerträglich ist.坚持不懈!http://blog.tanging.net Just to add one more point to get clear idea.
yes, the name space has no specified meaning and it should be unique. Also It has no relation with the deployment URL or the Internet location where the Service is deployed. It has to do with the contract.
If you change the contract from one customer to another customer then these namespace should be changed but If you are changing the deployment environment then there is no need to change the name space.
Thanks
Paramjit.Thanks


