Well, you can't be 100% sure because you can't control what other people type into their WSDL files... However, you can be somewhat certain about uniqueness if you follow some basic principles. One of them is to include the company's domain name in the URN (e.g. "urn:mycompany.com-webservices-stockquote"). I remember stumbling onto a longer list of these "principles" but I can't remember where...
Originally posted by william kane: When a urn is supposed to the a UNIQUE name for a resource how do i ensure that the urn i give when creating a webservice in my server is unique over the web?
"urn:" is typically used to specify namespace URI of the service. If you use JAX-RPC, it clearly distinguishes where you use URL endpoint and Namespace URI. I did'nt find any confusion ! For example, To invoke a service using JAX-RPC Dynamic proxy, I set the following: String UrlString = "http://localhost:80/MyHelloService/MyHelloService?WSDL"; String nameSpaceUri = "urn:MyHelloService/wsdl"; String serviceName = "MyHelloService"; String portName = "MyHelloServiceRPCPort";
URL helloWsdlUrl = new URL(UrlString); ServiceFactory serviceFactory = ServiceFactory.newInstance(); Service helloService = serviceFactory.createService(helloWsdlUrl, new QName(nameSpaceUri, serviceName));