Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why targetNamespace?

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic