aspose file tools
The moose likes Web Services and the fly likes Significance of default Namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Significance of default Namespace" Watch "Significance of default Namespace" New topic
Author

Significance of default Namespace

Sriram Anbarasu
Greenhorn

Joined: Dec 09, 2005
Posts: 4
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.


Regards,<br />Sriram.A
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
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:


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Significance of default Namespace
 
Similar Threads
TargetNameSpace
Need to create a web service in Java that reads data and results in XML.
NoClassDefFoundError
Apache ODE Webservices
Can we support Map/HashMap in the webservice as one of internal parameters?