This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Target namespace

 
Sam Ruben
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats the purpose using target namespace in a wsdl?
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A target namespace qualifies the children attributes so that you can refer to multiple children that have the same name but different contexts. For example, a child named 'ZipCode' in the 'com.yourcompany.inquiry' namespace might only need a single numeric five digit integer whereas a child named 'ZipCode' in 'gov.usps.www' namespace might need a character string of ten characters in length (zip+four).
 
Sam Ruben
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thank you. I just have a doubt. namespace is generally used to avoid conflicts in naming XML tags.

eg:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com">

why does the targetNamespace is used here? what the value http://www.w3schools.com is referred to?

xmlns:xs="http://www.w3.org/2001/XMLSchema -- I have understood this point.
 
Anurag Verma
Ranch Hand
Posts: 167
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
targetNamespace is similar as giving package name in java & namespaces in C++. By targetNamespace we specify that the xml is inside the mentioned namespace.
Did that answer or you needed something else?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic