File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Target namespace

 
Sam Ruben
Greenhorn
Posts: 9
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic