Download presentation
Presentation is loading. Please wait.
Published byKerrie Hope Paul Modified over 8 years ago
1
1 Web Service Description Language (WSDL) 大葉大學資工系
2
2 Introduction WSDL is created by the collaboration of Microsoft and IBM to standardize the way to describe services. Properties of WSDL Specify the service’s capabilities, location, and how to access the service Define the structure of the messages a service sends and receives Provide specific technical information for communicating with the service
3
3 WSDL in Web Service XML Registry or WSDL Repository Web Servic e Client 1. Web service administrator posts WSDL document to XML registry or WSDL repository 2. Retrieve WSDL document 3. Invoke
4
4 WSDL and Code Generation
5
5 WSDL Specification WSDL is an XML grammar for describing web services. The specification is divided into six major elements. : Root WSDL element : What data types will be transmitted? : What messages 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 service located?
6
types Provides definitions for the data types that SOAP messages contain. All the data types used between the client and server W3C XML Schema specification is the default choice 6 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://greath.example.com/2004/schemas/resSvc" xmlns="http://greath.example.com/2004/schemas/resSvc">
7
7 definitions The root element of all WSDL documents Name of the web service Namespace used in the document All service elements <definitions name=“ValidateAddress” targetNamespace=“http://yourserver/wsdl/” xmlns:http=“http://schemas.xmlsoap.org/wsdl/http/” xmlns:mime=“http://schemas.xmlsoap.org/wsdl/mime” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” />
8
8 message Describe a one-way message, whether is a single message request or a single message response. Define name of the message. Contain zero or more part elements, which can refer to parameters or return value. For the GET or POST tags, each part must be given a data type (s:string) For the SOAP transmission, no data type is specified. Use the to represent the structure for the parameter.
9
message 9
10
portType Combine multiple message elements to form a complete one-way or round-trip operation. A portType can define multiple operations. 10 Validates the city/state/zip code …
11
11 WSDL Specification binding Describe the concrete specifics of how the service will be implemented on the wire. service Define the address for invoking the specified service.
12
12 Example 1 message Represent the variables that the clients and Web services transfer between each other. The “part” sub-element specifies the name and data type of message exchanged. name: parameters, element: s0:valid_credit_card The types of the messages in the “schema” element.
13
13 Example 1 portType Contain “operation” elements, which translate the messages defined in the WSDL “message” elements to those passed to and from the actual services. Each operation element contains an “input” and an “output” element, each of which associates a “message” element.
14
14 Example 1 binding The “binding” element specifies how the client and Web service should send messages to one another.
15
15 Example 1 service Specify the URL that clients use to invoke the Web service. Each “port” sub-element contains a URL for a unique bidning.
16
16 WSDL Specification WSDL defines an XML-based grammar for describing network services as a set of endpoints that accept messages containing either document- oriented or procedure-oriented information. Schema: WSDL Framework: http://schemas.xmlsoap.org/wsdl/. WSDL SOAP binding: http://schemas.xmlsoap.org/wsdl/soap/. WSDL HTTP GET & POST binding: http://schemas.xmlsoap.org/wsdl/http/. WSDL MIME binding: http://schemas.xmlsoap.org/wsdl/mime/.
17
17 Details Message: References to XML Schemas defining the different parts of the message (for example, Headers and Body). Operation: Lists the messages involved in one message flow of the endpoint. For example, a request-response operation would refer to two messages. PortType: The set of message flows (operations) expected by a particular endpoint type, without any details relating to transport or encoding. Binding: The transport and encoding particulars for a portType. Port: The network address of an endpoint and the binding it adheres to. Service: A collection of related endpoints.
18
18 WSDL Grammar for End Points
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.