Web Service Description Language
- Main elements of WSDL description
- Abstract: which compound types are used, combined into which messages
- Concrete: How and where is the service to be contacted?
- Interface specification for web services
- Written in XML to be programming-language-agnostic
- Also includes how and where (URI) a service can be invoked
- Define which kinds of messages can be sent between different entities (which data types are included in which message)
WSDL Definitions
- Types: First define which data types are going to be exchanged between participants
- Use existing XML-based type system
- Message: Define which kinds of messages can be sent between different entities
- Which data types are included in which message
- These are abstract messages, no reference to how these messages are represented on the wire
- Port types: A set of supported operations form the type of a port
- Operation: An operation is a specification which abstract message type is sent and which one is received
- Four kinds of operations exist:
- One-way: entity only receives a message
- Request/response: entity receives a messages and answers with a message
- Solicit/response: entity sends a message and receives an answer
- Notification: entity only sends a message
- Binding: As a port type is still an abstract concept, a mapping to a single, real protocol has to be specified
- Message format, protocol details
- Typical bindings: SOAP, HTTP GET/POST
- Bindings must not include address information
- Service: Ports can be grouped into services
- Port: A real port is then a binding with an address
- Hence: an address where a number of operations can be invoked, along with the protocol information how to do so
- Ports within a service do not communicate with each other
- Service can contain several ports with the same port type, but different bindings -> alternative ways to access the same functionality using different protocols
- Port: A real port is then a binding with an address
Usage of WSDL
- Client
- reads WSDL to find out the functionality provided by Web Service -> all used data types are described in WSDL file
- creates stub from WSDL file
- uses SOAP to call a particular function listed in WSDL file