1 / 67

Web Services Introduction

Web Services Introduction. ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3a version 0.1. Distributed Computing Concepts. Web services build upon earlier distributed computing concepts One of the underlying concepts is the client-server model. Client-server model. Server.

Download Presentation

Web Services Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web ServicesIntroduction ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3a version 0.1.

  2. Distributed Computing Concepts Web services build upon earlier distributed computing concepts One of the underlying concepts is the client-server model.

  3. Client-server model Server Client Request service Database Server response

  4. Remote Procedure Call Early distributed computing system introduced in the 1980’s. Allows a local program to execute a procedure on a remote computer and get back results from the procedure. Basis of certain remote operations such as mounting remote files in a shared file system.

  5. Fundamental factors of RPC We need to know how and where to make the call. The basic RPC requires the calling program to know details about how to make the call (meaning and types augments and return value) The calling program also needs to know where to send the request.

  6. Service registry RPC introduced the concept a service registry a third party used to identify location of “service” (procedure). Using a service registry is now part of what is now called a Service-Oriented Architecture.

  7. Service-Oriented Architecture. Service registry Publish Find Bind Client Server (Service requester) (Service provider)

  8. Later systems Later forms of remote procedure calls in 1990’s introduced distributed objects: Examples • CORBA (Common Request Broker Architecture) • Java RMI (Remote Method Invocation)

  9. Some aspects for a new system • Universally agreed standardized interfaces • Inter-operability • The need to provide flexibility • Using the Internet as the network communication (Internet standards)

  10. Web Services • Introduced in the 2000. • Software components designed to provide specific operations (“services”) accessible using standard Internet technologies and standardized protocols. The specific standards and protocols will be described shortly. • For machine interaction over a network.

  11. Stateless Web Service • It is generally thought that web services should be stateless – they do not remember or store information themselves from one invocation to the next. • Any state information needed by the web service to complete a client request or maintained should be held separately.

  12. First attempt as a stateful service A now defunct attempt at providing a stateful service was embodied in the OGSI standard which was part of the OGSA grid computing standard • Introduced in 2002(?) • Abandoned in 2004 Will look at this way briefly later.

  13. Web Service with state Web services can be front-ends to stateful resources. Example Business application might access an inventory of items being held through a web service. Web service Database request data request data return data

  14. Stateless web service + stateful resource Concept formalized in a standard called WS-RF framework. WS-RF also at the center of recent grid computing software (Globus 4.0). Provides a way of identifying resource through the web service, and other things such as resource lifetime

  15. Web Service addressing Usually located by a URI. Example http://www.cs.uncc.edu:8080/axis/MyMath This URL is only supposed to be accessed by a computer program.

  16. Internet Application Web service could be located on a computer anywhere on the Internet. Web Services User might interact with an application that accesses the web service to perform a function.

  17. Note • The term “Web Service” is a little misleading as the web service need not be on the web. • It could be on the same computer as the client, or another computer in a local cluster.

  18. WS-Addressing • WS-Resource Framework introduced a standard for addressing WS-Resources, called WS-Addressing • Introduces an End-Point Reference (EPR) to point to the service, which will provide the URL and possibly additional information about the service.

  19. Service-Oriented Architecture • 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.

  20. Service-Oriented Architecture Service registry 1. Publish 2. Find 3. Bind Service requester Service provider

  21. 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.

  22. 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.

  23. XML-based Web Services • XML provides a flexible basis for storing and retrieving service information on web services.

  24. Structure of an XML document • Optional Prolog • Root Element

  25. Prolog Includes: • Processing instruction to specify how to process document.. Uses symbol sequence: <? … ?> • Meta-information about document, and comments.

  26. One PI identifies document as a XML document, e.g. <?xml version=“1.0” encoding=“UTF-8”?> • Comments, same form as HTML: <!-- this is a comment -->

  27. Root element • Root element contains contents of document. • Other elements are within root element and can be nested.

  28. 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.

  29. 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.

  30. Qualifying names Qualified name given by namespace identifier and name used in document: Qualified name = namespace identifier + local name

  31. 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

  32. Associating namespace identifier with local name • Names in document given a prefix, i.e.: <mypo:street> • Namespace identifier associated with prefix in root element:: xmlns:mypo=“http://www.cs.uncc.edu/~abw/ns”

  33. Namespace Example prefix <mypo:po xmlns:mypo=“http://www.cs.uncc.edu/~abw/ns”> <mypo:description> Computer, Pentium IV, 4.7 Ghz, 4 Gbytes main memory </mypo:description> </mypo:po>

  34. Can apply namespace to every tag without a prefix automatically if that is required: <mypo:po xmlns=“http://www.cs.uncc.edu/~abw/ns”> <description> Computer, Pentium IV, 4.7 Ghz, 4 Gbytes main memory </description> </mypo:po>

  35. Defining Legal XML Tags Legal tags in a document defined optionally using either: Document type definitions (DTD) within document using <!DOCTYPE …. > (old, not allowed with SOAP) or XML schema

  36. 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

  37. The name space given by the xmlns tag becomes the default namespace unless overridden by a prefix.

  38. XML Schema StructureExample <?xml version=“1.0” encoding=“UTF-8”?> <myRootElement xmlns=http://www.cs.uncc.edu/namespaces/myName/ myMathService> … <operation> … </operation> … </myRootElement> Here all tags without prefixes have the namespace given

  39. XML Schema StructureExample <?xml version=“1.0” encoding=“UTF-8”?> <myRootElement xmlns:math=http://www.cs.uncc.edu/namespaces/myName/ myMathService> … <math:operation> … </math:operation> … </myRootElement> Here the tag operation is qualified with the prefix math that identifies the namespace

  40. Schema • One could arrange that all those processing the document are preconfigured to use a specific schema or, better • The scheme could be specified in the document

  41. Associating a Schema with an instance of an XML document XML schema Document xlns:xsi=“http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=“ .. “

  42. Schema validation • The schema approach allows documents that are supposed to conform to XML syntax and a specific schema to be checked against the scheme, prior to processing. Formally two aspects • Well-formedness – document conforms to rules of XML syntax. • Validity – checks the structure and identity of elements etc. that the document should have from that schema.

  43. XML “scheme definition languages” (XSD) • Each XML document conforms to its own schema that defines the tags. • This gives an infinite number of XML “languages.” • Many XML languages invented for specific purpose. • All one needs is the language schema to use it.

  44. Web Service Description • Need a way of formally describing a service, what is does, how it is accessed, etc. • An Interface Description language (IDL)

  45. 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.

  46. Parts of a web services WSDL document Root definitions and namespaces Abstract definition of service Binding definitions to network protocols Message definitions (parameters in method signature) Service definitions (where service is, ports) Type definitions - data types

  47. Web Services 1 3 2 4 5 6 From http://www.globus.org

  48. UDDI Registries Web service registries can be based upon UDDI registries (Universal Description Discovery, and Integration), introduced in 2001. UDDI specification standardized by OASIS (Organization for the Advancement of Structured Information Standards) See: http://www.oasis-open.org

  49. Notes • The UDDI registry is a web service itself. • The (UDDI) registry itself has to be known to both the client and service. • Registry technically unnecessary if the client already knows about the service, but usually some form of service registration and locator is present.

  50. UDDI Service registry UDDI Service definition Publish Find Location of service Give me your WSDL WSDL Service definition WSDL Request service operation Result Client Server (Service requester) (Service provider) Steps to access a web service in a Service-Oriented Architecture

More Related