WSDL - WSDL Patterns of Operation
WSDL Patterns of Operation
In WSDL, a "pattern of operation" defines how messages are exchanged between a client (consumer) and a web service (provider).
There are four main patterns in WSDL 1.1:
1. One-Way
-
What happens: The client sends a message to the web service.
-
No response is expected.
-
Use case: Sending data like logs, updates, or notifications.
Example:
A weather sensor sends temperature data to a server—no reply needed.
2. Request-Response
-
What happens: The client sends a request, and the service responds with a message.
-
This is the most common pattern in web services.
-
Use case: When you need data back, like in a login or database query.
Example:
Client sends user login credentials → server sends back a success or error message.
3. Solicit-Response
-
What happens: The web service sends a request to the client, and the client responds.
-
This is less common, as most services wait for the client to initiate.
Use case: When the service actively asks for data from the client.
Example:
The server requests a report from the client → client replies with the report.
4. Notification
-
Similar to One-Way, but initiated from the web service side.
-
The service sends a message to the client without expecting a reply.
-
Use case: Sending alerts, updates, or announcements.
Example:
A stock alert service pushes a price alert to a subscribed client.