Presentation is loading. Please wait.

Presentation is loading. Please wait.

3c.1 Elements of a WSDL document. 3c.2 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties.

Similar presentations


Presentation on theme: "3c.1 Elements of a WSDL document. 3c.2 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties."— Presentation transcript:

1 3c.1 Elements of a WSDL document

2 3c.2 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties of a service: What it is - operations (methods) it provides. How it is accessed - data format, protocols. Where it is located - protocol specific network address.

3 3c.3 Parts of a WSDL Document Root definitions - namespaces portType definitions - abstract definition of service Message definitions - parameters in method signature Type definitions - data types Binding definitions - to protocols i.e. SOAP over HTTP Service definitions - where service is, ports

4 3c.4 Derived from “The Grid Core Technologies” by M. Li and M. Baker, Wiley, 2005. Service Port Port Type Operation A Messages (input, output) Operation B Messages (input, output) Bindings

5 3c.5 port and service Describe “where” service is. port - describes how a binding is deployed at the endpoint of a network service - a named collection of ports

6 3c.6 portType Describes “What” - an abstract definition of service operation. Compare to a Java interface. Uses the elements: message definitions - a set of parameters referred to by method signature, decomposed into parts type definitions - defines all data types used

7 3c.7 Binding Describes “how” the elements in abstract interface (portType) are converted in actual data representations and protocols e.g. SOAP over HTTP. Could be more than one binding associated with a portType.

8 3c.8 Math Web service For concreteness, let us consider the web service used in assignment 1. A simple version is: public class MyMath { public int squared(int x) { return x * x; }

9 3c.9 <wsdl:definitions targetNamespace="http://DefaultNamespace" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://DefaultNamespace" xmlns:intf="http://DefaultNamespace" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/" namespace="http://DefaultNamespace" use="encoded"/> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/ encoding/" namespace="http://DefaultNamespace" use="encoded"/> Namespaces Message definitions portType Bindings Service definitions WSDL file for myMath service

10 3c.10 Root Definitions Namespaces <wsdl:definitions targetNamespace="http://DefaultNamespace" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://DefaultNamespace" xmlns:intf="http://DefaultNamespace" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

11 3c.11 <wsdlsoap:address location= "http://localhost:8080/axis/testaccount/MyMath"/> Service/Port Definitions Where math service is located Name of service Name of port Next slidefrom Slide 3a14

12 3c.12 <wsdl:input message="impl:squaredRequest“ name="squaredRequest"/> <wsdl:output message="impl:squaredResponse“ name="squaredResponse"/> portType Definitions See next slide

13 3c.13 Message Definitions Input message datatype Standard XML integer type Bindings Output message datatype Standard XML integer type

14 3c.14 <wsdlsoap:binding style="rpc“ transport= "http://schemas.xmlsoap.org/soap/http"/> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/> Binding definitions to slide 3a.10 Bindings for messages


Download ppt "3c.1 Elements of a WSDL document. 3c.2 Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties."

Similar presentations


Ads by Google