This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Rationale behind portType, binding in wsdl

 
Greenhorn
Posts: 10
Python Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a wsdl we define the operation name, input and output in the portType element; later on in binding we define operation, input and output again. What is the rationale behind this? why define them twice? I understand in binding we define the encodingStyle and other attributes, so what is the need of portType?
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A port type is an abstract definition of a set of interactions between two logical services. A binding is a concrete definition of how the messages used to implement the logical services will be instantiated in the physical world. Each binding is then associated with a set of network details that finish the definition of one endpoint that exposes the logical service defined by the port type.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Port type help you to define operations that a web service performs. These operations are unaware of transport protocol that we are going to use at runtime. So these operations are transport protocol agnostic.
Binding help you to define how these operation's request and response data is transported over the wire according to which SOAP version.
For example -
You have a web service which perform book query and return book name.
You have a set of Clients of your Web Service who want to call and consume web service operations through JMS protocol.
You can another set of Clients of your Web service who want to call and consumer Web service operations through HTTP protocol.

So for such requirement, it will be tedious ( and non - manageable) if we have to define and deploy two set of Web service to cater to these two different set of Client (JMS based client and HTTP based Client).
Therefore, Binding declaration help us in defining two ways to access web service operations - through JMS and through HTTP. So we have to deploy single Web Service but we expose two end point address of same web service - one end point address can be used by JMS based client and another end point address can be used by HTTP based client.




 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just found this excellent diagram which show structure of WSDL file. Thought of sharing it here so that future aspirant can understand WSDL structure in better way.
http://download.oracle.com/otn_hosted_doc/jdeveloper/1012/web_services/ws_wsdlstructure.html

reply
    Bookmark Topic Watch Topic
  • New Topic