aspose file tools*
The moose likes XML and Related Technologies and the fly likes why targetNamespace? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "why targetNamespace?" Watch "why targetNamespace?" New topic
Author

why targetNamespace?

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
if i am saying
<definitions name="StockQuote"
targetNamespace="http://exle.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/">
in my xml schema .What is the significance of the targetnamespace?Does targetNameSpace state the location of the file which i am authoring so that when people use the elements that i have defined they specify http://exle.com/stockquote.wsdl for their xmlns?


Help me!Help you!!!
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by william kane:
if i am saying
<definitions name="StockQuote"
targetNamespace="http://exle.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/">
in my xml schema .What is the significance of the targetnamespace?Does targetNameSpace state the location of the file which i am authoring so that when people use the elements that i have defined they specify http://exle.com/stockquote.wsdl for their xmlns?

No!.
<definitions name="StockQuote"
targetNamespace="http://exle.com/stockquote.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="checkUserNameRequest">
<part name="parameters" element="UserName" />
<message>
..
</definitions>

The line xmlns="http://schemas.xmlsoap.org/wsdl/" specifies that the elements and datatypes used in the schema comes from the namespace http://schemas.xmlsoap.org/wsdl/
whereas the line targetNamespace="http://exle.com/stockquote.wsdl"
specifies that the elements defined by this schema like checkUserNameRequest,UserName comes from namespace http://exle.com/stockquote.wsdl
Rgds
Balaji


Spritle Software Blogs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why targetNamespace?