Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Confusion in WSDL?

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I started web services (with Axis2 documentation) some days back. Though I am aware about namespace thing but still trying to make comfortable myself in WSDL. I have some confusion listed below...
- How to decide which namespaces should be declared? eg. in WSDL 1.1 and WSDL 2.0 have huge list of namespaces!!!
- Can related namespaces be declared on the corresponding element instead of declaring at the top? eg. the namespace "http://www.w3.org/2001/XMLSchema"; is declared on TYPES in wsdl 2.0, can we declare it at top? Is vise-versa possible for other namespaces also?
- the namespace "http://www.w3.org/2003/05/soap/bindings/HTTP"; is declared in BINDING element, can we declare it at top?
- TYPES element has different 'targetnamespace' irrespective of declaring one at top!!!

Anybody can guide, how to be comfortable for all this?

Thanks.
 
shai ban
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any pointer will be helpful!!!

Thanks in advance.
 
Ranch Hand
Posts: 343
Mac OS X Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

shai ban wrote:Hi,
I started web services (with Axis2 documentation) some days back. Though I am aware about namespace thing but still trying to make comfortable myself in WSDL. I have some confusion listed below...
- How to decide which namespaces should be declared? eg. in WSDL 1.1 and WSDL 2.0 have huge list of namespaces!!!
- Can related namespaces be declared on the corresponding element instead of declaring at the top? eg. the namespace "http://www.w3.org/2001/XMLSchema"; is declared on TYPES in wsdl 2.0, can we declare it at top? Is vise-versa possible for other namespaces also?
- the namespace "http://www.w3.org/2003/05/soap/bindings/HTTP"; is declared in BINDING element, can we declare it at top?
- TYPES element has different 'targetnamespace' irrespective of declaring one at top!!!

Anybody can guide, how to be comfortable for all this?

Thanks.



Hi,

I think you are not clear with XML Fundamentals. First make them clear and then dive into WebServices otherwise it is going to be difficult to understand what is happening.


- How to decide which namespaces should be declared? eg. in WSDL 1.1 and WSDL 2.0 have huge list of namespaces!!!


For WSDL you have to define following namespaces:-
1. wsdl - http://schemas.xmlsoap.org/wsdl/
2. soap - http://schemas.xmlsoap.org/wsdl/soap/ (if you are using SOAP Binding)
3. http - http://schemas.xmlsoap.org/wsdl/http/ (if you are using HTTP Binding)
4. soapenv - http://schemas.xmlsoap.org/soap/envelope/ (For SOAP-Envelope)
5. soapenc - http://schemas.xmlsoap.org/soap/encoding/ (for SOAP Encoding)
6. xsd - http://www.w3.org/2000/10/XMLSchema (XML Schema)
7. tns - namespace to refer elements in the "current document" (this namespace)
8. Any other application-specific namespace.
9. mime - http://schemas.xmlsoap.org/wsdl/mime/ (MIME binding)

Out of these 1, 4 and 7 are required. Rest will depend on your usage. 6 you can define in TYPES.


- Can related namespaces be declared on the corresponding element instead of declaring at the top? eg. the namespace "http://www.w3.org/2001/XMLSchema"; is declared on TYPES in wsdl 2.0, can we declare it at top? Is vise-versa possible for other namespaces also?


Yes. But make sure nothing else breaks.


- the namespace "http://www.w3.org/2003/05/soap/bindings/HTTP"; is declared in BINDING element, can we declare it at top?


No. You are defining the binding and not declaring the namespace over here.


- TYPES element has different 'targetnamespace' irrespective of declaring one at top!!!



First make yourself clear with XML technology.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic