+ All Categories
Home > Documents > Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system...

Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system...

Date post: 26-Dec-2015
Category:
Upload: nathaniel-leonard
View: 231 times
Download: 0 times
Share this document with a friend
Popular Tags:
31
Web Services
Transcript
Page 1: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web Services

Page 2: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Kas ir Web servisi?

Eksistē daudz dažādas definīcijas…

“A software system designed to support interoperable Machine to Machine interaction over a network“

“Web based application that uses open, XML-based standards and transport protocols to exchange data with clients”

Page 3: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

W3C definīcija

A Web service is a software applicationidentified by a URI,

whose interfaces and binding are

capable of being defined, described and

discovered by XML artifacts andsupports direct interactions with other

software applicationsusing XML based messages

via internet-based protocols

Page 4: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Citiem vārdiem...

• Web serviss ir programmatūra, kas ir identificējama tīmeklī pēc URI, kurai klienti piekļūst izmantojot uz XML balstītu protokolu (SOAP), kurš tiek izmantots virs Internet protokola (HTTP)

• Klienti piekļūst Web servisa programmai caur tas interfeisiem un saistībām (bindings), kuri ir definēti izmantojot XML artefaktus (WSDL)

Page 5: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

No biznesa skatiena...

• Web Services: A distributed or virtual applications or processes that use the Internet to link activities or software components.

• A travel Web site that:• takes a reservation from a customer,• sends a message to a hotel application, accessed via

the Web, to determine if a room is available,• books it, • tells the customer he or she has a reservation

is an example of a Web Services application.“Business Process Trends” http://www.bptrends.com/resources_glossary.cfm?letterFilter=W&displayMode=all

Page 6: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu raksturojums

• XML based everywhere• Message-based• Platform and programming language independent• Could be dynamically located• Could be dynamically assembled or aggregated• Accessed over the Internet• Loose coupling between invoker and service• Based on industry standards

Page 7: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Distributed Computing Evolution

Page 8: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Traditional C/S vs. Web Services

Page 9: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web Application vs. Web Services

Page 10: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu attīstība• Web servisu attīstības fāzes:

• Phase 1 (1999-2001)• Simple• Business-to-Consumer (B2C)

• Phase 2 (2002-2004)• Enterprise Application Integration (EAI)• Private UDDI Registries

• Phase 3 (2005-...)• Business-to-Business (B2B) • Public UDDI Registries

• [W3C] Web Services Activity: Historyhttp://www.w3.org/2002/ws/history.html

Page 11: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu arhitektūra

Page 12: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu standarti

• Common markup language for communication• XML (eXtensible Markup Language)

• Common message format for exchanging information• SOAP (Simple Object Access Protocol)

• Common service specification formats• WSDL (Web Services Description Language)

• Common means for service lookup• UDDI (Universal Description, Discovery, and

Integration)

Page 13: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web Services Big Picture

• Service Discovery• UDDI

• Service Description• WSDL

• XML Messaging• SOAP and XML-RPC

• Service Transport• HTTP, SMTP, FTP etc.

XML Messaging

Service Transport

Service Discovery

Service Description

The Protocol Stack

Page 14: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu mijiedarbība

Web servisi un Web servisu klienti sadarbojas izmantojot SOAP, WSDL, UDDI tehnoloģijas

Page 15: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Pamata specifikācijas

• Pamata specifikācijas ir apvienotas WS-I profilā

• WS-I = Web Services Interoperability

• Svarīgākas WS-I specifikācijas:• WS-I Basic Profile• Simple Soap Binding Profile• Basic Security Profile

• Papildus WS-I piedāvā:• Sample Applications • Testing Tools

Page 16: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Papildus specifikācijas

Dažas specifikācijas bija izstrādātas, lai paplašināt Web servisu spējas un ir apvienotas WS-* profilā• WS-Security

• WS-Reliability

• WS-ReliableMessaging

• WS-Addressing

• WS-Transaction

• WS-BPEL

• vēl daudz citas...

Page 17: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Java EE & Web Services

Page 18: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Java EE & Web Services

• J2EE community has defined overall framework for Web Services in J2EE 1.4 (JSR 109)

• Java EE 5 accelerates and radically simplifies Enterprise Java development, especially for Web Services

• The Java EE platform provides a complete framework for developing and deploying Web Services on the Java platform

Page 19: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Java EE tehnoloģijas

Primāras Java EE 5 platformas tehnoloģijas:

• Java API for Web Services (JAX-WS) 2.0

• Java API for XML-Based RPC (JAX-RPC) 1.1

• Java Architecture for XML Binding (JAXB) 2.0

• SOAP with Attachments API for Java (SAAJ)

• Streaming API for XML (StAX)

• Web Service Metadata for the Java Platform

Page 20: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu veidi

Web servisu izmantošanas stili:

• RPC = Remote procedure calls• A distributed function (or method) call interface

• SOA = Service-oriented architecture• Basic unit of communication is a message, rather than an

operation

• RESTful = Representational state transfer• An attempt to emulate HTTP and similar protocols by

constraining the interface to a set of well-known, standard operations (e.g., GET, PUT, DELETE)

Page 21: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web servisu mijiedarbības veidi

• Sinhroni web servisi• Klienti sūta pieprasījumu servisam un pārtrauc savu

darbību kamēr gaida atbildi• RPC-oriented approach• JAX-RPC servlet endpoint

• Asinhroni web servisi• Klienti inicializē servisa pieprasījumu un turpina savu

darbību negaidot atbildi• Document-oriented approach• JAX-RPC servlet endpoint + JMS + EJB

Page 22: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Classification

• “Big Web Services”• Traditional enterprise Web services

• SOAP & WSDL

• “Lighter-weight Web Services”• RESTful approach

• Web API (feature of Web 2.0)

• Mashups

Page 23: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

RESTful

• REST (Representational State Transfer)

is a key design idiom that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URLs

• The definition of RESTful web service consists of• The base URI for the web service (http://example.com/resources/)

• The MIME type of the data supported by the web service

• e.g. JSON, XML, YAML

• The set of operations supported by the web service using HTTP methods

• e.g. POST, GET, PUT, DELETE

http://java.sun.com/developer/technicalArticles/WebServices/restful/

Page 24: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web API

• Web APIs are functionalities made available by websites to their users or visitors in a programmatically way

• Developers can use these Web APIs and enrich their applications with useful functions from third parties

• Web API is a new direction to follow by W3C in a new working group: Web APIs Working Group

http://www.w3.org/2006/webapi/

Page 25: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Web API

• Some of the most well-known web APIs are • Google Maps or Google Search• Yahoo Maps or Yahoo Search• eBay API• Amazon API• Paypal API• Skype API• and many more

• Some links:• http://www.programmableweb.com/apis • http://www.webapi.org • http://www.w3.org/2006/webapi/

Page 26: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Mashups

• Mashup is a web page or application that combines data or functionality from two or more external sources to create a new service

• Easy, fast integration, frequently using open APIs and data sources

• Types of mashups:• consumer mashups

• data mashups

• enterprise mashup

Page 27: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Spring Web Services

• Spring Web Services (Spring-WS)

is a product of the Spring community focused on creating document-driven Web services

• Aims to facilitate contract-first SOAP service development (as opposed to contract-last approach)

http://static.springsource.org/spring-ws/sites/1.5/reference/html/index.html

Page 28: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

Summary

• Web services provides a new paradigm for program to program communication

• Web services standards are XML, SOAP, WSDL and UDDI

• Comprehensive set of Java APIs for Web services is available!

• Java EE is the platform of choice for Web services

Page 29: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

References

• Java Web Services At a Glance http://java.sun.com/webservices/index.jsp

• Book “J2EE Web Services” by Richard Monson-Haefel

http://www.amazon.ca/J2EE-Web-Services-Richard-Monson-Haefel/dp/0321146182

• Web Service Interaction Architectures http://java.sun.com/blueprints/webservices/using/webservbp3.html

Page 30: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

References

• JBoss Web Serviceshttp://labs.jboss.com/jbossws/

• Spring Web Services http://static.springframework.org/spring-ws

/site/index.html

• Java Web Services Overview Presentation http://www.javapassion.com/webservices/WebServicesOverview.pdf

• Another Java Web Services Overview Presentation http://www.dma.unina.it/~murli/GridSummerSchool2004/presentations/Fox/background/WebServicesOverview.pdf

Page 31: Web Services. Kas ir Web servisi? Eksistē daudz dažādas definīcijas… “A software system designed to support interoperable Machine to Machine interaction.

References

• Services Mashups: The New Generation of Web Applicationshttp://dsonline.computer.org/portal/site/dsonline/menuitem.9ed3d9924aeb0dcd82ccc6716bbe36ec/index.jsp?&pName=dso_level1&path=dsonline/

2008/09&file=w5gei.xml&xsl=article.xsl


Recommended