You may have seen my previous post on SOAP vs. REST call. Now a day companies are moving to REST service calls but still there are majority of companies still uses SOAP over REST. This tutorial explains basic of WSDL (Web Service Description Language).
If you have any of below question then you are at right place:
- What is Web Services Description Language (WSDL)?
- WSDL Tutorial
- Web Services Description Language (WSDL) Explained
- Examples of WSDL – Web Service Description Language
Web Services Description Language (WSDL)
In Java Web Development World, WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate, however, the only bindings described in this document describe how to use
WSDL in conjunction with
HTTP GET/POST, and
Another must read:
- Create Sample WSDL in Eclipse and Generate Client
- How to build RESTful Service with Java using JAX-RS and Jersey (Example)
In other words: A WSDL document defines services as collections of network endpoints, or
ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This allows the reuse of abstract definitions:
messages, which are abstract descriptions of the data being exchanged, and
port types which are abstract collections of
operations. The concrete protocol and data format specifications for a particular port type constitutes a reusable
binding. A port is defined by associating a network address with a reusable binding, and a collection of ports define a service. Hence, a WSDL document uses the following elements in the definition of network services:
Types– a container for data type definitions using some type system (such as
Message– an abstract, typed definition of the data being communicated.
Operation– an abstract description of an action supported by the service.
Port Type–an abstract set of operations supported by one or more endpoints.
Binding– a concrete protocol and data format specification for a particular port type.
Port– a single endpoint defined as a combination of a binding and a network address.
Service– a collection of related endpoints.
Example: SOAP 1.1 Request/Response via HTTP
<element name="tickerSymbol" type="string"/>
<element name="price" type="float"/>
<part name="body" element="xsd1:TradePriceRequest"/>
<part name="body" element="xsd1:TradePrice"/>
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
Join the Discussion
Share & leave us some comments on what you think about this topic or if you like to add something.