WSDL - WSDL, SOAP, and UDDI Overview
1. WSDL, SOAP, and UDDI Overview
Component | Full Form | Purpose |
---|---|---|
WSDL | Web Services Description Language | Describes the service interface, available operations, data types, and endpoints. |
SOAP | Simple Object Access Protocol | Defines the communication protocol for sending/receiving messages. |
UDDI | Universal Description, Discovery, and Integration | Acts as a service registry to publish and discover WSDL documents. |
They work together in a Service-Oriented Architecture (SOA):
-
WSDL defines what the service does and how to use it.
-
SOAP defines how messages are sent.
-
UDDI helps find the service and retrieve its WSDL.
2. How WSDL, SOAP, and UDDI Work Together
The interaction follows the Publish → Discover → Bind model:
Step 1 — Publish (Provider → UDDI)
-
The Service Provider creates a WSDL file.
-
Publishes it to the UDDI registry for discovery.
-
Example:
Service: CustomerService WSDL: http://example.com/services/customer?wsdl Endpoint: http://example.com/services/customer
Step 2 — Discover (Consumer → UDDI)
-
The Service Consumer queries the UDDI registry to find services.
-
UDDI returns the WSDL URL and metadata.
Step 3 — Bind & Invoke (Consumer → Provider via SOAP)
-
The Consumer downloads the WSDL.
-
Uses it to generate client code using tools like:
-
Java →
wsimport
-
.NET →
svcutil
-
Python →
zeep
-
-
The consumer sends SOAP requests to the Service Provider.
-
The provider sends back SOAP responses.
3. Example of WSDL + SOAP + UDDI
Scenario: Bank Account Service
-
Provider: ABC Bank
-
Consumer: XYZ Corp
-
Registry: UDDI Directory
Step 1 — WSDL Created
ABC Bank creates a WSDL for AccountService
:
<definitions name="AccountService"
targetNamespace="http://abcbank.com/account"
xmlns:tns="http://abcbank.com/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="GetBalanceRequest">
<part name="accountID" type="xsd:int"/>
</message>
<message name="GetBalanceResponse">
<part name="balance" type="xsd:decimal"/>
</message>
<portType name="AccountPortType">
<operation name="GetBalance">
<input message="tns:GetBalanceRequest"/>
<output message="tns:GetBalanceResponse"/>
</operation>
</portType>
<binding name="AccountBinding" type="tns:AccountPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
</binding>
<service name="AccountService">
<port name="AccountPort" binding="tns:AccountBinding">
<soap:address location="http://abcbank.com/services/account"/>
</port>
</service>
</definitions>
Step 2 — WSDL Published to UDDI
-
ABC Bank registers the WSDL in the UDDI directory.
Step 3 — Consumer Discovers WSDL
-
XYZ Corp queries UDDI:
find_service("AccountService")
-
UDDI returns:
WSDL URL: http://abcbank.com/services/account?wsdl
Step 4 — Consumer Uses SOAP
XYZ Corp generates client code:
AccountService service = new AccountService();
AccountPort port = service.getAccountPort();
double balance = port.getBalance(101);
System.out.println(balance);
-
Request: SOAP XML request sent to ABC Bank.
-
Response: SOAP XML response with account balance.
4. WSDL + SOAP + UDDI Workflow
Architecture Steps:
-
Service Provider
-
Creates WSDL → Publishes to UDDI.
-
-
Service Registry (UDDI)
-
Stores and organizes WSDLs → Makes them searchable.
-
-
Service Consumer
-
Finds WSDL in UDDI → Generates client code → Calls service using SOAP.
-
5. Roles in SOA
Role | Technology Used | Function |
---|---|---|
Service Provider | WSDL, SOAP | Creates service, publishes WSDL |
Service Consumer | WSDL, SOAP | Uses WSDL to call the service |
Service Registry | UDDI | Stores and discovers WSDL docs |
6. Key Points
-
WSDL → Defines the what and how of the service.
-
SOAP → Handles communication between consumer and provider.
-
UDDI → Helps discover available services.