• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Significance of default Namespace

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can anybody tell me the difference between defaultNamespace and targetNamespace used in WSDL document?
It would be great if i could get a brief description about defaultNamespace and targetNamespace used in WSDL document.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The default namespace is the namespace the elements without a prefix belong to - provided you assign a namespace.

xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
All elements from the {http://schemas.xmlsoap.org/wsdl/} namespace must be prefixed with "wsdl:".

xmlns="http://schemas.xmlsoap.org/wsdl/"
All elements from the {http://schemas.xmlsoap.org/wsdl/} namespace do not have a prefix. Even though these elements do not have a prefix they are still namespace qualified.

There is no default namespace if there is no xmlns="..." declaration. In that case elements without a prefix do not belong to any namespace.

The targetNamespace is the namespace to which the WSDL definitions are assigned to.


In this example the default and targetNamespace are not the same:


In this example the default and targetNamespace are the same:
 
no wonder he is so sad, he hasn't seen this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic