Presentation is loading. Please wait.

Presentation is loading. Please wait.

14 Sep 2004 NVO Summer School1 Introduction to Web Services Technology Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY.

Similar presentations


Presentation on theme: "14 Sep 2004 NVO Summer School1 Introduction to Web Services Technology Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY."— Presentation transcript:

1 14 Sep 2004 NVO Summer School1 Introduction to Web Services Technology Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY

2 14 Sep 2004 NVO Summer School2 Overview SOA SOAP, WSDL and UDDI Infrastructures: AXIS,.Net (Mono), Python, Perl, PHP Invocation Interoperability Emerging topics: attachments, state, security, asynchronous

3 14 Sep 2004 NVO Summer School3 Service Oriented Astronomy An application architecture within which all functions are defined as independent services with well-defined invocable interfaces which can be called in defined sequences to form scientific processes. Web Services are an implementation

4 14 Sep 2004 NVO Summer School4 Technological challenges WS technologies need to address four basic challenges: –Service Description –Service Implementation –Service Publishing, Discovery and Binding –Service Invocation and Execution

5 14 Sep 2004 NVO Summer School5 Whats wrong with HTTP GET? Things should be made as simple as possible, but no simpler - Albert Einstein Highly scalable, predominantly read-only data REST (Representational State Transfer) Amazon.com: –has both REST and SOAP APIs –85% of requests are REST –REST response is 6 times faster than SOAP

6 14 Sep 2004 NVO Summer School6 Why is SOAP better? Send and receive complex datatypes to invoke a particular method not just key- value pairs Security - not URI parameters Guaranteed or exact execution Binds to other protocols

7 14 Sep 2004 NVO Summer School7 What is SOAP? Simple Object Access Protocol An XML-based communication protocol and encoding format for exchanging structured information in a decentralized, distributed environment W3C specification (http://www.w3.org/TR/soap)

8 14 Sep 2004 NVO Summer School8 Anatomy of a SOAP message An envelope to encapsulate data which defines formatting conventions for describing the message contents and routing directions A request/response message exchange pattern (RPC mechanism) A transport or binding protocol Data encoding rules for describing the mapping of application-defined datatypes into an XML tag-based representation

9 14 Sep 2004 NVO Summer School9 SOAP example Request: http://www.w3.org/2001/XMLSchema-instancehttp://www.w3.org/2001/XMLSchema float float float float Response: float

10 14 Sep 2004 NVO Summer School10 What is WSDL? Web Services Description Language An XML grammar for describing a web service as a collection of endpoints capable of exchanging messages in a particular fashion W3C specification (http://www.w3.org/TR/wsdl)

11 14 Sep 2004 NVO Summer School11 Anatomy of a WSDL file * * * * * * * - include other WSDLS - define datatypes used in elements - model data exchanged - a subset of operations supported for an endpoint - define input and output messages - concrete protocol and data format specification for a element - identifies actual endpoint for WS

12 14 Sep 2004 NVO Summer School12 WSDL example (I)

13 14 Sep 2004 NVO Summer School13 WSDL example (II) Return the comoving line of sight distance......

14 14 Sep 2004 NVO Summer School14 WSDL binding flavours (I) RPC Document Literal Encoding

15 14 Sep 2004 NVO Summer School15 WSDL binding flavours (II) 5 5 5 RPC Document Literal Encoding

16 14 Sep 2004 NVO Summer School16 Document/literal wrapped

17 14 Sep 2004 NVO Summer School17 UDDI Universal Description, Discovery and Integration A platform-independent, open framework for publishing and discovering information about web services OASIS specification (http://www.uddi.org)

18 14 Sep 2004 NVO Summer School18 What do I need? SOAP library WSDL parser Client and server stub code generator Service container (UDDI library)

19 14 Sep 2004 NVO Summer School19 Whats available? Java (http://www.javaskyline.com/webservices): –Axis (http://ws.apache.org/axis) –Globus (http://www.globus.org) C#: –.Net; Mono (http://www.go-mono.com)http://www.go-mono.com –OGSI.NET / WSRF.NET (http://www.cs.virginia.edu/~gsw2c/wsrf.net.html) Perl: –SOAP::Lite (http://www.soaplite.com)http://www.soaplite.com –OGSI::Lite / WSRF::Lite (http://www.sve.man.ac.uk/Research/AtoZ/ILCT) Python: –SOAPpy / ZSI (http://pywebsvcs.sourceforge.net)http://pywebsvcs.sourceforge.net –Twisted (http://www.twistedmatrix.com/products/twisted) –PyGlobus/PyGridWare PHP –NuSOAP (http://dietrich.ganx4.com/nusoap)http://dietrich.ganx4.com/nusoap XForms (http://www.w3.org/MarkUp/Forms)

20 14 Sep 2004 NVO Summer School20 Client Invocation Models Static: use generated stubs Dynamic: –no generated code –a proxy dynamically generates a class at runtime that conforms to a particular interface, proxying all invocations to a single generic method –standard Java : use javax.xml.rpc.Service.getPort() and createCall() –.Net : use RealProxy class (must extend ContextBound) or Reflection.Emit

21 14 Sep 2004 NVO Summer School21 Interoperability Suitable for and capable of being implemented in a neutral manner on multiple operating systems and in multiple programming languages Not all web services are interoperable! Web Services Interoperability Organisation (http://www.ws-i.org)http://www.ws-i.org WS-I Testing Tools

22 14 Sep 2004 NVO Summer School22 Emerging technologies Attachments: –DIME vs. MTOM (http://www.w3.org/TR/soap12- mtom)http://www.w3.org/TR/soap12- mtom Security: –WS-Security (http://www- 106.ibm.com/developerworks/webservices/library/ws -secure)http://www- 106.ibm.com/developerworks/webservices/library/ws -secure –WSS4J? State: –WSRF (http://www.globus.org/wsrf)http://www.globus.org/wsrf Asynchronous: – WS-CAF (http://www.arjuna.com/standards/ws-caf)http://www.arjuna.com/standards/ws-caf – WSRF

23 14 Sep 2004 NVO Summer School23 Conclusions Make sure a web service is the best solution to an application requirement Focus on the WSDL Use your favourite language and platform Interoperability is a great idea Be aware of emerging and converging technologies


Download ppt "14 Sep 2004 NVO Summer School1 Introduction to Web Services Technology Matthew J. Graham CACR/Caltech T HE US N ATIONAL V IRTUAL O BSERVATORY."

Similar presentations


Ads by Google