Download presentation
Presentation is loading. Please wait.
Published byCameron Golden Modified over 9 years ago
1
WSDL : Web Service Definition Language Dr. Yuhong Yan NRC-IIT-Fredericton Internet logic
2
WSDL: describe a web services Initialized by IBM, Microsoft, Ariba and 6~ other companies 2004.8: w3c releases WSDL 2.0
3
Interoperability Using WSDL Get WSDL doc Invoke Service J2EE Container Service Objects WSDL description Client Service SOAP HTTP
4
WSDL: Describe a web service Interface information describing all publicly available functions Data type information for all message requests and message responses Binding information about the transport protocol to be used Address information for locating the specified services
5
WSDL: A contract between requestor and provider Platform and language-independent Describe SOAP services Automatic tool to generate client and sever code
6
What do we learn? WSDL specification Generate WSDL for a service (from java objects to WSDL) Generate java classes from WSDL Other ways for distributed system: rmi, and CORBA
7
An example of WSDL: HelloWorld Root element, defines namespaces WSDL-SOAP binding xmlschema WSDL schema Convention, refer to itself (?) WSDL uses it to generate package name
8
Where is the service located? The service location: the endpoint of the SOAP message
9
- - - - Bind messages to operations Use SOAP HTTP protocol
10
- Bind messages to operations Operation: sayHello Input Message: sayHelloRequest Output Message: sayHelloResponse
11
Define message: sayHelloRequest Content of message Define massage: sayHelloResponse Parameter 1, type string Parameter 2, type string Parameter 1, type string
12
Structure of WSDL P121 fig 6-1 : Root WSDL Element :What data types will be transmitted? :What message will be transmitted? :What operations (functions) will be supported? :How will the messages be transmitted on the wire? What SOAP-specific details are there? :Where is the service located?
13
Definition: Root element Name of the web service Declare multiple namespaces
14
Complex data types: Not used if limit to XML schema Define complex types (correspondent to a class in java)
15
Message definitions: A request message or a response message Name of the message Element defines the data types used in the message Types of the parameters for the request message Types of the return values for the response message
16
Operation definitions: Operations: the remote methods Input/output messages for operations -
17
Operation patterns supported by WSDL 1.1 P126. fig 6-3 Client One-way Request-response Client Solicit-response Notification Service Service 1 1 2 2
18
Basic patterns of operation One-way: –The service receives a message. –The operation therefore has a single input element Request-response: –The service receives a message and sends a response –One input element, one output element
19
Basic patterns of operation (2) Solicit-response –The service sends a message and receives a response –The operation has one output message, followed by one input message Notification –The service sends a message. –The operation has one output message
20
Transmission protocols: Binding transmission protocols to operations Axis: http
21
Service location: SOAP endpoint of the web service
22
Second example: WSDL of StockQuote Deploy the sample StockQuoteService The WSDL is at http://localhost:8080/axis/services/urn:xmltoday- delayed-quotes?wsdl
23
Messages
24
Operations -
25
Binding - -
26
Service location -
27
WSDL Summary : The StockQuoteService : 1)getQuoteRequest: parameter:symbol; type: string 2)getQuoteResponse: return float :getQuote operation that consists of a request/response service :Direction to use the SOAP HTTP transport protocol. :Service available at: localhost:8080/axis/services/urn:xmltoday-delayed- quotes
28
Using WSDL with Axis Obtaining WSDL for deployed services WSDL2Java: Building stubs, skeletons, and data Java2WSDL: Building WSDL from Java
29
Obtain WSDL for deployed services Axis generates WSDL for any deployed services In the service list, check the WSDL files
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.