• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

use of urn in soap service?

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
Well, you can't be 100% sure because you can't control what other people type into their WSDL files...


Hi koskela,
Is there a standard registry where i can register my urn and be rest assured that it cannot be duplicated?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't think of any standard registry for URNs except ICANN, which manages the URLs.
 
Author
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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));

MyHelloServiceRPC myProxy = (MyHelloServiceRPC) helloService.getPort(new QName(nameSpaceUri, portName), MyHelloServiceRPC.class);
System.out.println(myProxy.sayHello("Buzz"));
You may take a look at:
http://java.sun.com/j2ee/1.3/docs/tutorial/doc/JAXRPC4.html
- Ramesh
 
Ramesh Nagappan
Author
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by william kane:

Hi koskela,
Is there a standard registry where i can register my urn and be rest assured that it cannot be duplicated?


If you are trying registering the service using its WSDL, you may think of registering the service using ebXMLRR (which compliments UDDI) and use JAXR API to register and find services.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic