Every new web service you create using visual studio comes with a predefined namespace like this:
[WebService(Namespace = "http://tempuri.org/")]
My web service will run at different clients, and on different domains, so because of this I don't know the domain upfront during development, also I don't want to have to edit this file, each time I deploy to a new client.
What exactly should the value of Namespace be? It seems like a web address, but that doesn't make sense to me.
tempuri.org is the test default namespace URI used by Microsoft development products, like Visual Studio. It is available for XML Web services that are under development, but published XML Web services should use a more permanent namespace.
The service description for a XML Web service is defined in XML, specifically in Web Services Description Language (WSDL). Within the Service Description for an XML Web service, Namespace is used as the default namespace for XML elements directly pertaining to the XML Web service.
It's kind of ironic but the best answer is under : http://tempuri.org/
quote
Each XML Web Service needs a unique namespace in order for client applications to distinguish it from other services on the Web. By default, ASP.Net Web Services use http://tempuri.org/ for this purpose. While this suitable for XML Web Services under development, published services should use a unique, permanent namespace.
Your XML Web Service should be identified by a namespace that you control. For example, you can use your company's Internet domain name as part of the namespace. Although many namespaces look like URLs, they need not point to actual resources on the Web.
For XML Web Services creating using ASP.NET, the default namespace can be changed using the WebService attribute's Namespace property. The WebService attribute is applied to the class that contains the XML Web Service methods. Below is a code example that sets the namespace to "http://microsoft.com/webservices/":
C#
[WebService(Namespace="http://microsoft.com/webservices/")]
public class MyWebService {
// implementation
}
Put in your domain, as developer ;)
it is basically used as resource identifier to schemata. But it seems to ahve no real use except being "part of the standard".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With