It’s back! Just when we thought that we’ve seen the dreadful namespace http://tempuri.org is coming back at us with full power.
The feeling you get when a web service is exposed under the namespace tempuri.org is that the developer of that web service is either sloppy or don’t now what he is doing.
Well, well - don’t be like that when it comes to using WCF. Here is an article describing how to do it. The key points are quite easy:
- Use the ServiceBehavior attribute. Note: on the service implementation - not on the contract!
- Set the namespace-property to the namespace you want.
Here is an example (yes, i know, it’s in dredded VB.NET):
<ServiceBehavior(Namespace:=”http://www.marcusoft.net/Services/2008/04/MyService”, )> _ Public Class MyServiceImplementation implements IService … End Class