Download presentation
Presentation is loading. Please wait.
1
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction
2
Grid Computing, B. Wilkinson, 20043a.2 Web Services Software components designed to provide specific operations (“services”) accessible using standard Internet technology. For machine interaction over a network. Usually through SOAP (simple Object Access Protocol) messages carrying XML documents, and a HTTP transport protocol.
3
Grid Computing, B. Wilkinson, 20043a.3 Basic client-server model
4
Grid Computing, B. Wilkinson, 20043a.4 Client needs to: –Identify location of the required service –Know how to communicate with the service to get it to provide the actions required. Uses service registry - a third party.
5
Grid Computing, B. Wilkinson, 20043a.5 Service-Oriented Architecture Steps: Services “published” in a Service registry. Service requestor asks Service Registry to locate service. Service requestor “binds” with service provider to invoke service.
6
Grid Computing, B. Wilkinson, 20043a.6 2. Find 3. Bind 1. Publish Service-Oriented Architecture Service requester Service registry Service provider
7
Grid Computing, B. Wilkinson, 20043a.7 Key aspects Has similarities with RMI and other distributed object technologies (CORBA etc.) but:: Web Services are platform independent – They use XML within a SOAP message). – Most use HTTP to transmit message.
8
Grid Computing, B. Wilkinson, 20043a.8 XML-based Web Services XML provides a flexible basis for storing and retrieving service information on web services. Web services use data-centric XML documents to communicate information.
9
Grid Computing, B. Wilkinson, 20043a.9 Web Services “Stack” HTTP transport SOAP message carrying XML documents WSDL (Web Services Description Language used to describe message syntax for invoking a service and its response. UDDI (Universal Description, Discovery and Integration) used as web service discovery mechanism.
10
Grid Computing, B. Wilkinson, 20043a.10 Web Services “Stack” + XML
11
Grid Computing, B. Wilkinson, 20043a.11 Web Services From http://www.globus.org 1 23 4 5 6
12
Grid Computing, B. Wilkinson, 20043a.12 Simple Object Access Protocol (SOAP) A communication protocol for passing XML documents. Provides mechanisms for: –Defining communication unit - a SOAP message –Error handling –Extensions –Data representation –Remote Procedure Calls (RPC’s) –Document-centric approach for business transactions –Binding to HTTP
13
Grid Computing, B. Wilkinson, 20043a.13 SOAP Envelope <SOAP-ENV:Envelope xmlns=“http://schemas.xmlsoap.org/soap/envelope/”>... namespace, see later
14
Grid Computing, B. Wilkinson, 20043a.14 What goes down the Wire HTTP packet containing: –Stuff about context, transactions, routing, reliability, security –SOAP message –Attachments XML/SOAP standardization body, World Wide Web Consortium (W3C) covers SOAP and attachments.
15
Grid Computing, B. Wilkinson, 20043a.15 Structure of an XML document Optional Prolog Root Element
16
Grid Computing, B. Wilkinson, 20043a.16 Prolog Includes processing instruction ( ) to specify how to process document.. Includes meta-information about document, and comments.
17
Grid Computing, B. Wilkinson, 20043a.17 One PI identifies document as a XML document, e.g. Comments, same form as HTML:
18
Grid Computing, B. Wilkinson, 20043a.18 Root element Root element contains contents of document. Other elements are within root element and can be nested.
19
Grid Computing, B. Wilkinson, 20043a.19 XML Tags Not predefined as in HTML. Must define your own tags using names as names in a programming languages As in programming languages, restrictions. Case sensitive. Start with a letter. “Elements” have start and end tags. Start tags can have attributes as in HTML.
20
Grid Computing, B. Wilkinson, 20043a.20 Namespace Mechanism If XML documents combined, can be problem if different documents use the same tag names to mean different things. With namespace mechanism, tags given additional namespace identifier to qualify it.
21
Grid Computing, B. Wilkinson, 20043a.21 Qualifying names Qualified name given by namespace identifier and name used in document: Qualified name = namespace identifier + local name
22
Grid Computing, B. Wilkinson, 20043a.22 Namespace identifier Uses URI’s (Uniform Resource Identifiers) - web naming mechanism. URLs are a subset of URI, and would typically be used, e.g.: http://www.cs.wcu.edu/~abw/ns
23
Grid Computing, B. Wilkinson, 20043a.23 URIs also include email addresses, i.e. mailto:abw@email.wcu.edu and Uniform Resource Names (URNs) which are globally unique and persistent. UDDI uses URNs.
24
Grid Computing, B. Wilkinson, 20043a.24 Associating namespace identifier with local name Names in document given a prefix, i.e.: Namespace identifier associated with prefix in root element:: xmlns:po=“http://www.cs.wcu.edu/~abw/ns”
25
Grid Computing, B. Wilkinson, 20043a.25 Namespace Example Computer, Pentium IV, 2.8 Ghz, 4 Gbytes main memory prefix
26
Grid Computing, B. Wilkinson, 20043a.26 Can apply namespace to every tag without a prefix automatically if that is required: Computer, Pentium IV, 2.8 Ghz, 4 Gbytes main memory
27
Grid Computing, B. Wilkinson, 20043a.27 Defining Legal XML Tags Legal tags in a document defined optionally using either: –Document type definitions (DTD) within document. (old, not allowed with SOAP). or –XML schema
28
Grid Computing, B. Wilkinson, 20043a.28 XML Schema Flexible way of handing legal element names. Expressed in XML. Schema is an XML document with required definitions. Handles namespaces. Has notation of data types
29
Grid Computing, B. Wilkinson, 20043a.29 XML schema Document xsi:schemaLocation=“.. “
30
Grid Computing, B. Wilkinson, 20043a.30 XML Schema Structure Example <xsd:schema xmlns=“http://www.skatestown.com/ns/po” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” targetNamespace=http://www.skatestown.com/ns/po”> Purchase order schema for SkatesTown.. From: “Building Web Services with Java, making sense of XML, SOAP, WSDL, and UDDI, 2nd ed” by S. Graham et al, SAMS publishing, 2004, p 54.
31
Grid Computing, B. Wilkinson, 20043a.31 Associating schema to document Example <po:po xmlns:po=“http://www.skatestown.com/ns/po” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.skatestown.com/ns/po http://www.skatestown.com/schema/po.xsd” id=“43871” submitted=“2001-10-05”>. From: “Building Web Services with Java, making sense of XML, SOAP, WSDL, and UDDI, 2nd ed” by S. Graham et al, SAMS publishing, 2004, p 54.
32
Grid Computing, B. Wilkinson, 20043a.32 Additional XML materials On-line materials W3C consortium home page: http://www.w3.org/XML/ W3Schools XML Tutorial : http://www.w3schools.com/xml/
33
Grid Computing, B. Wilkinson, 20043a.33 Books Several books on XML, e.g.: “Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, 2nd edition” by S. Graham et al, SAMS publishing, 2004 Very good but 792 pages!!
34
Grid Computing, B. Wilkinson, 20043a.34 Additional SOAP materials See: http://www.w3c.org/TR/soap
35
Grid Computing, B. Wilkinson, 20043a.35 Hosting Environments for Web Services Microsoft.NET IBM Websphere Apache Axis - we will be using this for assignment 1
36
Grid Computing, B. Wilkinson, 20043a.36 More information on Axis http://xml.apache.org/axis
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.