Tags

links:
http://tutorials.jenkov.com/wsdl/description.html
http://stackoverflow.com/questions/7190572/targetnamespace-and-xmlns-without-prefix-what-is-the-difference
http://stackoverflow.com/questions/4126919/what-is-the-difference-between-targetnamespace-and-xmlnstarget
http://www.oracle.com/technetwork/articles/srivastava-namespaces-092580.html

summary:
– xmlns is the default ns used inside your xml
– targetNamespace is the target your xml is describing and declaring a namespace for other xml/xsd to refer to this schema
– targetNamespace should be the ns of your web service
– xmlns:tns should be set to the same URI as targetNamespace

– ns are like packages in java:
= package has reusable elements
= need to fully qualify with package name
= package may have inner class

– qualified or unqualified
= qualified, all elements and attr must have a namespace no matter they are global or local
= unqualified, only global declared elements and attr must have namespace
= qualified or not would fail the schema validation check

Advertisements