• Post Reply Bookmark Topic Watch Topic
  • New Topic

Qname, namespaceURI does it refer to a network location?  RSS feed

 
Thiru Sowri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Does the namespace URI passed in as a parameter to a Qname constructor represent a network location or is it just a string value?

Why most of the time it adopts the format of a URL say "http://myname.domain/myfolder1/myfolder2" or "urn://myname.domain/myfolder1/myfolder2" ? Why can't it be a variable name or just a simple string value like foo, bar, bigbrother, littlesister etc...?

If in a java web service, the method implementation constructs a Qname with namespaceURI say "http://company.com/objects", does it mean that the web service method, when invoked, will hit the namespaceURI ?

I am in a project that transitions support of an application from vendor1 to another, the web service implementation has methods that construct Qname with namespace URI like "http://vendor1.com/objects". I have to remove the occurrences of vendor1 from all kind of string values, for that I want to understand whether this points to an URL in vendor1's network.

Appreciate your help.
thanks
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Google for historical side of why in detail.

2. Simplified, it's a kind of java package name concept or domain name (uniqueness)

Suppose,

your company has



my company


How would a third refer to your Test.java or mine Test.java?
 
Paul Clapham
Sheriff
Posts: 22375
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a link to the very first tutorial about XML namespaces.

Near the end it says
Tim Bray wrote:The reason that the W3C decided to use URLs as namespace names is that they contain domain names (e.g. www.xml.com), which work globally across the Internet.


It also specifically addresses the other questions that you asked.
 
Seiki Alice
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank you so much for your post.

__________________
watch movies online free
 
Vijitha Kumara
Bartender
Posts: 3993
31
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the CodeRanch both of you, Thiru Sowri & Seiki Alice!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!