Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presentation 7: SOAP, WSDL & introduction to UDDI.

Similar presentations


Presentation on theme: "Presentation 7: SOAP, WSDL & introduction to UDDI."— Presentation transcript:

1 Presentation 7: SOAP, WSDL & introduction to UDDI

2 Ingeniørhøjskolen i Århus Slide 2 af 46 Outline Overview of Web Services & SOAP Service-Oriented Architecture –Service Description –Service Registration and Discovery –Service Execution Emerging Web Services standards: SOAP, WSDL, UDDI (introduced)

3 Ingeniørhøjskolen i Århus Slide 3 af 46 Overview SOAP & Webservices SOAP – Simple Object Access Protocol - & Webservices: –A light weight & ultra heterogenic alternative to CORBA, DCOM & RMI –Openness in focus – meant for opening legacy applications for others –Not meant in the role of Inter business, large scale, transaction heavy communication (as CORBA & J2EE) –But can prob. be used for it! –Does not have services for transactions, concurrency, persistence, scalability –Does have discovery services (UDDI) giving location transparency –Does have Interface Definition Language for heterogeneity (WSDL) –Fails on several Emmerich points!

4 Ingeniørhøjskolen i Århus Slide 4 af 46 Why SOAP when we have CORBA? CORBA has been considered too complex by many –May not be true with new development tools using wizards They aim at solving different tasks: –SOAP covers leightweight application integration within the enterprise, exposing legacy buisness objects across enterprises, and sharing ressources (like Google Search Engine) on the net, as well as technology openness –CORBA has a wide range of services for (as we shall see later): Locating, creating & moving objects Object relationship management between hosts Persistency services – activation frameworks etc. Distributed concurrency and transaction mangement Security –Only some are supported in SOAP tech family – its lightweight –Lesson: define your needs – and find the right technology

5 Ingeniørhøjskolen i Århus Slide 5 af 46 Regarding SOAP SOAP is not by it self revolutionary – its merely: –a framework for exchanging XML-based information in a network (via protocols of the TCP/IP family) – with RPC capabilities –the currently most hyped XML / Web service technology But when combined with other technologies like –WSDL & –UDDI –It solves several of the requirements of a Distributed System (as seen by Emmerich) And the fact that it is an open standard – supported by all major software vendors and programming languages: –C++ –Java –C# –Delphi –Visual Basic and many more Makes it somewhat revolutionary! A practical soloution – like WWW

6 Ingeniørhøjskolen i Århus Slide 6 af 46 Examples of Webservices Google's Web Service - access the Google search engineGoogle's Web Service –http://www.google.com/apis/ Amazon's Web Service - access Amazon's product informationAmazon's Web Service –http://associates.amazon.com/exec/panama/associates/join/develo per/resources.html XMethods - collection of information about existing Web servicesXMethods –http://www.xmethods.com SalCentral - WSDL / SOAP Web services search engineSalCentral –http://www.salcentral.com/salnet/webserviceswsdl.asp

7 Ingeniørhøjskolen i Århus Slide 7 af 46 Google Webservice

8 Ingeniørhøjskolen i Århus Slide 8 af 46 Service-Oriented Architecture (SOA) Client Server Registry Abstract Architechture - Webservice stack Abstract Architechture - Webservice stack Legacy code on server Legacy code on server 1 1 2 2 3 3 Opening up for doing business (the sharing of objects) on the Internet

9 Ingeniørhøjskolen i Århus Slide 9 af 46 Technologies for implementing SOA SOAP for communication WSDL for contract & binding UDDI & WSDL for registration & discovery

10 Ingeniørhøjskolen i Århus Slide 10 af 46 SOAP SOAP is used for Client/Server communications

11 Ingeniørhøjskolen i Århus Slide 11 af 46 What is SOAP Simple Object Access Protocol Wire protocol similar to –IIOP for CORBA –JRMP for RMI XML is used for data encoding –“text” based protocol vs. “binary” protocol Supports XML-based RPC

12 Ingeniørhøjskolen i Århus Slide 12 af 46 What is SOAP not Not a component model –So it will not replace objects and components, i.e. EJB, JavaBeans and.NET Not a programming language –So it will not replace Java, C# og C++ Not a solution for all –So it will not replace other distributed computing technologies such as RMI and CORBA

13 Ingeniørhøjskolen i Århus Slide 13 af 46 Where is SOAP? SOAP 1.1 submitted as W3C note W3C XML Protocol working group –SOAP 1.2 current version: working draft 3 –http://www.w3.org/TR/soap12/http://www.w3.org/TR/soap12/ Convergence with other XML standards –As: ebXML's Message Service –SOAP with Attachments

14 Ingeniørhøjskolen i Århus Slide 14 af 46 What does SOAP define? Message Envelope Encoding Rules RPC Convention Binding with underlying protocols –HTTP (which we will use in this course) –SMTP –FTP and others

15 Ingeniørhøjskolen i Århus Slide 15 af 46 SOAP Message Format Possible to Attach binarys (images, cryptographic material) to attachments

16 Ingeniørhøjskolen i Århus Slide 16 af 46 SOAP Message Envelope Encoding information Header –Optional –Could contain context knowledge Security Transaction Body –RPC methods and parameters –Contains application data

17 Ingeniørhøjskolen i Århus Slide 17 af 46 Two types of communication

18 Ingeniørhøjskolen i Århus Slide 18 af 46 SOAP RPC Request Example <SOAP-ENV:Envelope xmlns:SOAP-ENV="…" SOAP-ENV:encodingStyle="…"> SUNW

19 Ingeniørhøjskolen i Århus Slide 19 af 46 SOAP RPC Response Example <SOAP-ENV:Envelope xmlns:SOAP-ENV="…" SOAP-ENV:encodingStyle="…"> 30.5

20 Ingeniørhøjskolen i Århus Slide 20 af 46 SOAP RPC composition I Information needed for a method call: 1.The URI of the target object (marked with red) SUNW

21 Ingeniørhøjskolen i Århus Slide 21 af 46 SOAP RPC composition II Information needed for a method call: 1.The URI of the target object 2.The Method Name SUNW

22 Ingeniørhøjskolen i Århus Slide 22 af 46 SOAP RPC composition III Information needed for a method call: 1.The URI of the target object 2.The Method Name 3.Parameters 4.Binding protocol (next slide) SUNW Name is not important

23 Ingeniørhøjskolen i Århus Slide 23 af 46 SOAP RPC composition IV: complete SOAP RPC Request POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI" <SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/encoding" SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/envelope/"> SUNW HTTP Encoding Name- space STEP 4: BINDING TO PROTOCOL

24 Ingeniørhøjskolen i Århus Slide 24 af 46 Request to HelloWorld.jws Input parameters type string HTTP Post Call HTTP Host Target Method name

25 Ingeniørhøjskolen i Århus Slide 25 af 46 … and the HTTP Response from Server HTTP Response Method Response Parameter value Parameter name Apache Tomcat Server Responding

26 Ingeniørhøjskolen i Århus Slide 26 af 46 In addition There is: –Response handling –Fault handling

27 Ingeniørhøjskolen i Århus Slide 27 af 46 Lucky us Luckly we dont have to understand SOAP –So it does not really matter that it is somewhat complex –Unless we want to develop clients that do not have a SOAP API –... But then we need an XML parser … and more … –BUT IT IS POSSIBLE and might be feasible

28 Ingeniørhøjskolen i Århus Slide 28 af 46 How to make a Webservice with SOAP You need an application or API capable of supporting: –Communication over the Internet (HTTP) –Security (SSL) –XML Parsing capabilities –… Two examples of Application Servers with support: –Apache Tomcat Application Server with AXIS –Microsoft Internet Information Server JAX-RPC (JSR-101) –Java™ API for XML-based RPC –Need to implement features manually

29 Ingeniørhøjskolen i Århus Slide 29 af 46 Apache Tomcat AS Works on: –Windows, UNIX, LINUX, (perhaps) LIAB (not tested yet), SBC? –Can be compiled to any platform (with some work) Can be found at: –http://jakarta.apache.org/tomcat/index.htmlhttp://jakarta.apache.org/tomcat/index.html Server listening for events: –HTTP on port 8080 (optionel) –Executes Servlets/JSP and JAVA applications –AXIS is an embedded project within the Tomcat environment SOAP Client Java, C++, C#, Delphi, VB Application SOAP Client Java, C++, C#, Delphi, VB Application SOAP over HTTP Web Server Apache / MS IIS Web Server Apache / MS IIS AS/SOAP Server (Tomcat with AXIS) AS/SOAP Server (Tomcat with AXIS) JSP/ Servlet JSP/ Servlet Web Service Web Service Object Common code base!

30 Ingeniørhøjskolen i Århus Slide 30 af 46 Issues with SOAP –Lack of business semantics –Insufficient functionality for business operations –Security –Reliability –Under development Low performance

31 Ingeniørhøjskolen i Århus Slide 31 af 46 WSDL WSDL is used for describing WebServices

32 Ingeniørhøjskolen i Århus Slide 32 af 46 What is WSDL? XML language for describing web services Web service is described as – A set of communication endpoints (ports) Endpoint is made of –Abstract definitions of operations and messages –Concrete binding to networking protocol and message format

33 Ingeniørhøjskolen i Århus Slide 33 af 46 Why WSDL? Enables automation of communication details between communicating partners –Machines can read WSDL –Machines can invoke a service defined in WSDL Note that WSDL defines only low-level aspects of Web services, however other technologies might follow … –Security –Transactions –Persistensservices

34 Ingeniørhøjskolen i Århus Slide 34 af 46 WSDL Document Example Simple service providing stock quotes A single operation called GetLastTradePrice Deployed using SOAP 1.1 over HTTP Request takes a ticker symbol of type string Response returns price as a float

35 Ingeniørhøjskolen i Århus Slide 35 af 46 WSDL Elements Types –Data type definitions –Used to describe exchanged messages –Uses W3C XML Schema as canonical type system

36 Ingeniørhøjskolen i Århus Slide 36 af 46 WSDL Example: Types

37 Ingeniørhøjskolen i Århus Slide 37 af 46 WSDL Elements Messages –Abstract, typed definitions of data being exchanged Operations –Abstract description of an action –Refers to input and output messages Port type –Collection of operations –Resembles a Class in OOPL

38 Ingeniørhøjskolen i Århus Slide 38 af 46 Example: Messages, Operation, Port type

39 Ingeniørhøjskolen i Århus Slide 39 af 46 WSDL Elements Binding –Concrete protocol and data format for a particular Port type –Example: SOAP 1.1, HTTP, MIME Port –Defines a single communication endpoint –Address for binding –URL for HTTP, email address for SMTP Service –Aggregate set of related ports

40 Ingeniørhøjskolen i Århus Slide 40 af 46 WSDL Elements

41 Ingeniørhøjskolen i Århus Slide 41 af 46 HelloWorld.jws?wsdl

42 Ingeniørhøjskolen i Århus Slide 42 af 46 Tools Generate WSDL document from –existing Java classes or EJB components –AXIS: Java2WSDL Generate SOAP messages from –WSDL document (via client stub and server skeleton) JAX-RPC, Forte for Java, JBuilder, JDeveloper

43 Ingeniørhøjskolen i Århus Slide 43 af 46 UDDI UDDI for publishing & discovery – the SOA

44 Ingeniørhøjskolen i Århus Slide 44 af 46 UDDI Universel Descrition, Discovery & Integration UDDI defines a scheme to publish and discover information about Webservices Programmatic registration and discovery business entities and their Webservices Based on SOAP, HTTP, XML Registry data –Business registrations –Service type definitions

45 Ingeniørhøjskolen i Århus Slide 45 af 46 Registration “ White pages” – Address, contact, and known identifiers “ Yellow pages” –industrial categorizations –Industry: NAICS (Industry codes - US Govt.) –Product/Services: UN/SPSC (ECMA) –Location: Geographical taxonomy “ Green pages” –technical information about services

46 Ingeniørhøjskolen i Århus Slide 46 af 46 What uses UDDI? Tool building client (Service Consumer) –Browse or search registry –Create a service proxy Tool publishing the service –Generates WSDL –Construct UDDI entries Application that needs dynamic binding –Directly access UDDI –Query can be pre-generated


Download ppt "Presentation 7: SOAP, WSDL & introduction to UDDI."

Similar presentations


Ads by Google