WSDL(Web Services Definition Language) – A WSDL is an XML document that describes a web service.WSDL tells about the functions that you can implement or exposed to the client. For example: add, delete, subtract and so on.

UDDI(Universal Description, Discovery and Integration)- It is directly that is used to publish and discover public web services. UDDI is an obsolete failure that is almost never used in practice.UDDI works just like a telephone directory where a business can be registered as per its name, geography and the web services it publishes.UDDI registers the WSDL address URL of a web service. A client of the web service searches and finds the WSDL in the UDDI registry. Once received the WSDL can be invoked by using the URL.

SOAP(Simple Object Access Protocol) – SOAP is an XML-based protocol that lets you exchange info over a particular protocol (can be HTTP or SMTP, for example) between applications. It stands for Simple Object Access Protocol and uses XML for its messaging format to relay the information.

WSDL: When we go to a restaurant we see the Menu Items, those are the WSDL’s.

Proxy Classes: Now after seeing the Menu Items we make up our Mind (Process our mind on what to order): So, basically we make Proxy classes based on WSDL Document.

SOAP: Then when we actually order the food based on the Menu’s: Meaning we use proxy classes to call upon the service methods which is done using SOAP

SEI(service endpoint interface):The endpoint is a connection point where HTML files or active server pages are exposed. .A web service endpoint is the URL that another program would use to communicate with your program. To see the WSDL you add ?wsdl to the web service endpoint URL.

Parts of WSDL
Definitions – variables – ex: myVar, x, y, etc.

Types – data types – ex: int, double, String, myObjectType

Operations – methods/functions – ex: myMethod(), myFunction(), etc.

Messages – method/function input parameters & return types

ex: public myObjectType myMethod(String myVar)
Porttypes – classes (i.e. they are a container for operations) – ex: MyClass{}, etc.

Example of a Endpoint URL





Simple SOAP Request and Response


import java.util.ArrayList;
import java.util.List;

import javax.jws.WebService;

public class Products 
  List<String> arrProducts = new ArrayList<String>();
  public Products()
  public String getProduct(int index)
	return arrProducts.get(index);  

SOAP Request

<soapenv:Envelope xmlns:soapenv="" xmlns:org="">

SOAP Request

<soap:Envelope xmlns:soap="">
      <ns2:getProductResponse xmlns:ns2="">

Di-section of WSDL

  1. service – Contains the port which defines the Endpoint URL, port number
  2. portType – Contains input and output for an operation.Though there are multiple input and output arguments they would be bundled together as one message
  3. binding – Defines how the SOAP service could be accessed like over http,https
  4. types – Type defined as complex type defines the Input and output
  5. message – Kind of input and output taken as argument, mostly represented as Message


 <wsdl:service name="ProductsService">
  <wsdl:port binding="tns:ProductsServiceSoapBinding" name="ProductsPort">
   <soap:address location="http://localhost:8096/WebService1/Products"/>


 <wsdl:portType name="Products">
   <wsdl:operation name="getProduct">
    <wsdl:input message="tns:getProduct" name="getProduct"></wsdl:input>
    <wsdl:output message="tns:getProductResponse" name="getProductResponse"></wsdl:output>


<wsdl:binding name="ProductsServiceSoapBinding" type="tns:Products">
      <soap:binding style="document" transport="" />
      <wsdl:operation name="getProduct">
         <soap:operation soapAction="" style="document" />
         <wsdl:input name="getProduct">
            <soap:body use="literal" />
         <wsdl:output name="getProductResponse">
            <soap:body use="literal" />


      <xs:schema xmlns:xs="" elementFormDefault="unqualified" targetNamespace="" version="1.0">
         <xs:element name="getProduct" type="tns:getProduct" />
         <xs:element name="getProductResponse" type="tns:getProductResponse" />
         <xs:complexType name="getProduct">
               <xs:element name="arg0" type="xs:int" />
         <xs:complexType name="getProductResponse">
               <xs:element minOccurs="0" name="return" type="xs:string" />


 <wsdl:message name="getProduct">
      <wsdl:part element="tns:getProduct" name="parameters" />
   <wsdl:message name="getProductResponse">
      <wsdl:part element="tns:getProductResponse" name="parameters" />

Service(Class name with @WebService Annotation) 
Port(has Binding which defines portType)
    PortType(defines Operations)
Operations(defines input and output Type)

Annotations for WebService

@Webservice(name="MartCatalogue", portName="MartCataloguePort", serviceName="ProductsService", targetNamespace="")
@WebMethod(action="fetch_products", operationName="fetchProducts")


<wsdl:portType name="MartCatalogue">

portName and serviceName

wsdl:port binding="tns:productServiceSoapBinding" name="productPort">
  <soap:address location="http://localhost:8096/WebService1/productService"/>

Defines unique set of operations under namespace.Defaults to package name in java in reverse order


<wsdl:operation name="fetchProducts">
 <wsdl:operation name="fetchProducts">
      <soap:operation soapAction="fetch_products" style="document" />

Comments are closed.