Download presentation
Presentation is loading. Please wait.
Published byBrice Warner Modified over 9 years ago
1
WEB SERVICE DESCRIPTION LANGUAGE ( WSDL) -SIVA SAGAR TELLA
2
Overview What is WSDL? Why WSDL? Elements of WSDL. Structure of WSDL file. Different Elements of WSDL file.
3
What is WSDL ? WSDL stands for Web Service Description Language. WSDL is an XML document. WSDL is used to describe Web services. WSDL is also used to locate Web services.
4
Why WSDL? Many Organizations provide web services over the network. For a client to use a particular web service he has to know the format of the request to be sent and the format of the response that is returned. Client can also know the address of the web service using WSDL. WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint.
5
Elements of WSDL File definition of types definition of message definition of a port definition of a binding definition of a service
6
Structure of WSDL file The WSDL document can be divided into two groups of sections. 1) Abstract Definition. Platform and language independent elements are specified. 2) Concrete Descriptions. Platform and language dependent elements are specified Abstract Definition group contains, and elements. Concrete Description group contains and elements.
7
Client Invoking a Web Service
8
With WSDL Terminology
9
Element Root element of the WSDL document. Contains all other elements definitions in the documents. Sets the name of the WSDL document and declares the namespaces used in the document.
10
Outline of Element <definitions name="DefinitionsName" targetNamespace="NamespaceURI" xmlns:prefix="NamespaceURI" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd=“http://www.w3.org/2001/XMLSchema”http://www.w3.org/2001/XMLSchema xmlns="http://schemas.xmlsoap.org/wsdl/">
11
Attributes of Element targetNamespace : Specifies the name for the WSDL definition as a whole. All the elements in the definitions element declare their names in the targetNamespace Xmlns : (Used to denote the default namespace) states that attribute names without a namespace qualification are in the WSDL namespace. Default Namespace is “ http://schemas.xmlsoap.org/wsdl” Xmlns:prefix : states the names beginning with the prefix “prefix” belongs to the namespace specified by this value.
12
Element Contains schema definitions of the data types used in the messages that compose the service. WSDL uses XML Schema syntax to define data types. This element is optional if the service uses the primitive data types defined by XML Schema.
13
Example <xsd:schema targetNamespace= "http://www.roguewave.com/webservices/examples/WeatherSummary.xsd"
14
Element Continued.. This types element contains a complete XML Schema. The schema defines a single complexType named WeatherSummary. The WeatherSummary type contains a “zipcode” element of type xsd:string, a “windSpeed” element of type xsd:unsignedInt, a “sky” element of type xsd:string, and a “temp” element of type xsd:int.
15
Element Defines the content of a message that the service supports. Each message holds one or more part elements. A part reference a parameter in the message. The parts can be compared to the parameters of a function call in a traditional programming language.
16
Element Continued.. Sample of element. Name Attribute: Specify the name of the message and name of part in the case of respective elements. Other elements in the WSDL document use this name to refer to this message.
17
Example of a The message named getSummary consists of a string named zipcode. The message named getSummaryResponse consists of a WeatherSummary named return
18
Element A port type is a named set of abstract operations. An operation is a set of messages. The element can be compared to a function library (or a module, or a class) in a traditional programming language. Example: <
19
Example </operation Compared to traditional programming, glossaryTerms is a function library, "getTerm" is a function with "getTermRequest" as the input parameter and getTermResponse as the return parameter.
20
Types of Operations One-way. The endpoint receives a message. Request-response. The endpoint receives a message, and sends a correlated message. Solicit-response. The endpoint sends a message, and receives a correlated message. Notification. The endpoint sends a message.
21
One-Way The outline for a one-way operation is: The input element specifies the abstract message format for the request operation.
22
Request-response Operation The outline for a request-response operation is: The input element specifies the abstract message format for the request operation. The output element specifies the abstract message format for the response operation. The fault element specifies the message format for the error messages
23
Solicit-response Operation The outline for a solicit-response operation is:
24
Notification Operation The outline for a notification operation is:
25
Element A binding element describes a specific communication protocol for a portType element. Each binding corresponds to a portType in the WSDL document. The binding element describes the specific protocol for each message in each operation of the portType element.
26
Element Continued…
27
Extensibility Elements The soap:binding element specifies that the binding protocol is SOAP. “style” attribute specifies whether the operation is RPC- oriented (messages containing parameters and return values) or document-oriented (message containing document). The soap:body binding element provides information on how to assemble the different message parts.
28
Element A service element describes a Web service as a collection of port elements. A port element defines a specific network address for a binding.
29
Element Continued… Outline of Service Element: Name attribute specifies a unique name for the service and port. Binding attribute of specifies the binding reference to which the network address is asscociated. The network address of the “ServiceName” is specified by the elements’s “location” attribute.
30
References Links: http://www.w3.org/TR/wsdl.html http://msdn.microsoft.com/archive/default.asp?url=/archive/en- us/dnarxml/html/wsdlexplained.asphttp://msdn.microsoft.com/archive/default.asp?url=/archive/en- us/dnarxml/html/wsdlexplained.asp http://www.systinet.com/doc/ssj60/primerj/primerj.wsprimer.wsdl.htm http://www.roguewave.com/support/docs/leif/leif/html/leifug/B-1.html Books: Author: Newcomer, Eric.Newcomer, Eric. Title: Understanding Web services : XML, WSDL, SOAP, and UDDI / Eric Newcomer.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.