3c.1 Elements of a WSDL document
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.
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
3c.4 Derived from “The Grid Core Technologies” by M. Li and M. Baker, Wiley, Service Port Port Type Operation A Messages (input, output) Operation B Messages (input, output) Bindings
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
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
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.
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; }
3c.9 <wsdl:definitions targetNamespace=" xmlns:apachesoap=" xmlns:impl=" xmlns:intf=" xmlns:soapenc=" xmlns:wsdl=" xmlns:wsdlsoap=" xmlns:xsd=" <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> <wsdlsoap:body encodingStyle=" encoding/" namespace=" use="encoded"/> Namespaces Message definitions portType Bindings Service definitions WSDL file for myMath service
3c.10 Root Definitions Namespaces <wsdl:definitions targetNamespace=" xmlns:apachesoap=" xmlns:impl=" xmlns:intf=" xmlns:soapenc=" xmlns:wsdl=" xmlns:wsdlsoap=" xmlns:xsd="
3c.11 <wsdlsoap:address location= " Service/Port Definitions Where math service is located Name of service Name of port Next slidefrom Slide 3a14
3c.12 <wsdl:input message="impl:squaredRequest“ name="squaredRequest"/> <wsdl:output message="impl:squaredResponse“ name="squaredResponse"/> portType Definitions See next slide
3c.13 Message Definitions Input message datatype Standard XML integer type Bindings Output message datatype Standard XML integer type
3c.14 <wsdlsoap:binding style="rpc“ transport= " <wsdlsoap:body encodingStyle=" namespace=" use="encoded"/> <wsdlsoap:body encodingStyle=" namespace=" use="encoded"/> Binding definitions to slide 3a.10 Bindings for messages