Web Services Martin Senger Abstract Web Services is a technology applicable for computationally distributed problems, including access.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
Advertisements

David Martin for DAML-S Coalition 05/08/2003 OWL-S: Bringing Services to the Semantic Web David Martin SRI International
Web Service Architecture
Overview of Web Services
Tuesday, June 10, 2003 Web Services Brief Overview & Security Assertion Coordinator Pattern by Mohammad Abushadi & Riaz Ahmed for Security Group CSE -
31242/32549 Advanced Internet Programming Advanced Java Programming
Presentation 7 part 2: SOAP & WSDL.
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
COM vs. CORBA.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
SOAP : Simple Object Access Protocol
Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
1 Understanding Web Services Presented By: Woodas Lai.
RPC Robert Grimm New York University Remote Procedure Calls.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
WEB SERVICES DAVIDE ZERBINO.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 2.
April 05 Prof. Ismael H. F. Santos - 1 Modulo II WebServices Prof. Ismael H F Santos.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Distributed Systems Architectures
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
Web Services Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
Web Services Architecture1 - Deepti Agarwal. Web Services Architecture2 The Definition.. A Web service is a software system identified by a URI, whose.
Presentation: SOAP in a distributed object framework, Application Servers & AXIS SOAP.
Outline  Enterprise System Integration: Key for Business Success  Key Challenges to Enterprise System Integration  Service-Oriented Architecture (SOA)
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Web Services. Abstract  Web Services is a technology applicable for computationally distributed problems, including access to large databases What other.
Web Services Presented By : Noam Ben Haim. Agenda Introduction What is a web service Basic Architecture Extended Architecture WS Stacks.
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
1 Web Services Web and Database Management System.
XML and Web Services (II/2546)
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
1 Engineering Web Based Legacy Systems By Kanchana Eramudugoda Distributed Computing – CS843.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
1 G52IWS: Web Services Chris Greenhalgh. 2 Contents The World Wide Web Web Services example scenario Motivations Basic Operational Model Supporting standards.
Web Services An Introduction Copyright © Curt Hill.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
12. DISTRIBUTED WEB-BASED SYSTEMS Nov SUSMITHA KOTA KRANTHI KOYA LIANG YI.
An Introduction to Web Services
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Martin Senger Web Services Martin Senger
Outline SOAP and Web Services in relation to Distributed Objects
Unit – 5 JAVA Web Services
Outline SOAP and Web Services in relation to Distributed Objects
Inventory of Distributed Computing Concepts and Web services
WebServices Using JAX-RPC
Introduction to Web Services
Distributed System using Web Services
Distributed System using Web Services
Presentation transcript:

Web Services Martin Senger

Abstract Web Services is a technology applicable for computationally distributed problems, including access to large databasesWeb Services is a technology applicable for computationally distributed problems, including access to large databases –What other technologies were/are available and how they compare with Web Services? The main buzzwords:The main buzzwords: –Integration & Standardization & Access by programs

Why to use more than one computer? Distributed resourcesDistributed resources –access to shared data –access to shared programs –access to CPU (e.g. many desktop PCs together), to memory, to special devices (e.g. printer) Complete independence on the internal implementationComplete independence on the internal implementation

Distributed architecture givesgives –access to distributed resources –development encapsulation maintainability, re-usability, legacy-awarenessmaintainability, re-usability, legacy-awareness –implementation independence requiresrequires –adding a communication layer between parts –synchronization of efforts including such nasty things as distributed garbage collectionincluding such nasty things as distributed garbage collection

Sending requests, getting results Waiting for requests (known location, known port) Waiting for requests (known location, known port) Communication protocol, Data format Distributed architecture Basic questions are:Basic questions are: –What kind of protocol to use, and what data to transmit –What to do with requests on the server side

Sending requests, getting results Waiting for requests (known location, known port) Waiting for requests (known location, known port) Data as name/value pairs Traditional CGI-based approach cgi-bin scripts:cgi-bin scripts: –Data transmitted as name-value pairs (HTML forms) –Transport over (state-less) HTTP protocol –no standards for keeping user sessions (state-fullness) –server side: a script is called

Sending requests, getting results Waiting for requests (known location, known port) Waiting for requests (known location, known port) Data in binary format CORBA-based approach CORBA:CORBA: –Data transmitted as objects (at least it looks like that) –Transport (usually) over well standardised IIOP protocol – user sessions (state-fullness) very inter-operable –server side: an RPC call is made

Sending requests, getting results Waiting for requests (known location, known port) Waiting for requests (known location, known port) Data in XML format SOAP-based communication SOAP:SOAP: –Data in a well-defined XML format –Transport over various protocols HTTP, SMTP are the most used, perhaps because they are firewall-friendlyHTTP, SMTP are the most used, perhaps because they are firewall-friendly –server side: either an RPC call or a message delivered

Web services A collection of XML-based technologies developed by the e-business community to address issues of:A collection of XML-based technologies developed by the e-business community to address issues of: –service discovery –interoperable data exchange and/or application invocation –service compositions (workflow, business processes) Major developers include:Major developers include: –Apache, IBM, HP, SUN & Microsoft (.NET)

W3C (working group) definition "A Web service is a software application identified by a URI, whose interfaces and bindings are capable of being defined, described and discovered as XML artefacts. A Web service supports direct interactions with other software agents using XML based messages exchanged via internet-based protocols.""A Web service is a software application identified by a URI, whose interfaces and bindings are capable of being defined, described and discovered as XML artefacts. A Web service supports direct interactions with other software agents using XML based messages exchanged via internet-based protocols."

Web Services Architecture Let a program “click on a web page”

Web Services Stack

SOAP Simple Object Access ProtocolSimple Object Access Protocol – A lightweight protocol for exchange of information in a decentralised, distributed environmentA lightweight protocol for exchange of information in a decentralised, distributed environment Two different styles to use:Two different styles to use: –to encapsulate RPC calls using the extensibility and flexibility of XML –…or to deliver a whole document without any method calls encapsulated

Request: setHelloMessage Request: getHelloMessage

XML Messaging Using SOAP

WSDL Web Services Definition LanguageWeb Services Definition Language – An XML-based language for describing Web ServicesAn XML-based language for describing Web Services –what the service does (description) –how to use it (method signatures) –where to find the service It does not depend on the underlying protocolIt does not depend on the underlying protocol But: It is not much human-readableBut: It is not much human-readable

Hello.wsdl </wsdl:definitions>

UDDI (and alternatives) Universal Description, Discovery and IntegrationUniversal Description, Discovery and Integration – UDDI creates a platform-independent, open framework & registry for:UDDI creates a platform-independent, open framework & registry for: –Describing services –Discovering businesses –Integrating business services The UDDI may be less used than predicted, especially on the Internet levelThe UDDI may be less used than predicted, especially on the Internet level BioMoby - an alternative for Life Sciences domain?BioMoby - an alternative for Life Sciences domain?

BioMoby

A Web Service example in Java SOAP-awareServlet (e.g. Apache Axis) SOAP-awareServlet Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” Any class processing the incoming requests (“business logic” HTTP Server Servlet engine (e.g. Apache Tomcat) Sending requests, getting results

Usual principles of Java toolkits Writing server is easier than writing clients (but only regarding the toolkit, not the business logic)Writing server is easier than writing clients (but only regarding the toolkit, not the business logic) Servers may be written independently on the used toolkitServers may be written independently on the used toolkit Always test interoperability with a non-Java client (because of data serialization and de-serialization)Always test interoperability with a non-Java client (because of data serialization and de-serialization) Steps:Steps: –write your service implementation –make all your classes available to the toolkit –deploy your service (usually done just once) –restart the whole servlet engine –test it with a client request

Java SOAP Toolkits Apache SOAP (was IBM’s SOAP4J)Apache SOAP (was IBM’s SOAP4J) Apache Axis (a follow-on to the Apache SOAP)Apache Axis (a follow-on to the Apache SOAP) …and many others…and many others …but let’s stay with Apache Axis:…but let’s stay with Apache Axis: –

package hello; public interface HelloWorld { String getHelloMessage(); void setHelloMessage (String newHello); } package hello; public class HelloWorldService implements HelloWorld { String message = "Hello, world!"; public String getHelloMessage() { return message; } public void setHelloMessage (String newMessage) { message = newMessage; } hello/HelloWorld.java hello/HelloWorldService.java

import org.apache.axis.client.*; public class HelloWorldClient { public static void main (String [] args) { try { // prepare the call (the same for all called methods) Call call = (Call) new Service().createCall(); call.setTargetEndpointAddress (new java.net.URL(" // call "get message" if (args.length == 0) { call.setOperationName ("getHelloMessage"); String result = (String) call.invoke ( new Object [] {} ); System.out.println (result); System.exit (0); } // call "set message" and afterwards "get message" call.setMaintainSession (true); // TRY also without this line... call.setOperationName ("setHelloMessage"); call.invoke ( new Object [] { args[0] } ); call.setOperationName ("getHelloMessage"); System.out.println (call.invoke ( new Object [] {} )); } catch (Exception e) { System.err.println ("ERROR:\n" + e.toString()); } HelloWorldClient.java

Generated for HelloWorld HelloWorldServiceLocator implements HelloWorldService HelloSoapBindingStub implements HelloWorld getHello() 1. Make an instance of this 3. Call methods on this proxy object 2. Use it to make an instance of this

public class HelloWorldClientFromStubs { public static void main (String [] args) { try { // prepare the calls (the same for all called methods) hello.generated.HelloWorldService service = new hello.generated.HelloWorldServiceLocator(); hello.generated.HelloWorld myHelloProxy = service.getHello(); // call "get message" if (args.length == 0) { String result = myHelloProxy.getHelloMessage() System.out.println (result); System.exit (0); } // call "set message" and afterwards "get message” myHelloProxy.setHelloMessage (args[0]); System.out.println (myHelloProxy.getHelloMessage()); } catch (Exception e) { System.err.println ("ERROR:\n" + e.toString()); } HelloWorldClientFromStubs.java

Java XML Data Mapping How Java objects are converted to/from XML data (in order to be able to be put into SOAP messages)How Java objects are converted to/from XML data (in order to be able to be put into SOAP messages) Important especially for the non-basic data typesImportant especially for the non-basic data types It’s easier if your non-basic data types are Java Beans (having set / get methods for members)It’s easier if your non-basic data types are Java Beans (having set / get methods for members)

A Web Service example in Perl This is a module implementing the “business logic” package HelloPerl; use strict; use vars qw( $Message ); $Message = 'Hello, here is Perl.'; sub getHelloMessage { $Message; } sub setHelloMessage { $Message = shift; } 1; This is a cgi-bin script #!/usr/bin/perl -w -- Perl – use SOAP::Transport::HTTP; SOAP::Transport:: -> dispatch_to('HelloPerl') -> handle; #!/usr/bin/perl –w use SOAP::Lite on_fault => sub {…}; print SOAP::Lite -> uri ('HelloPerl') -> proxy (' -> getHelloMessage -> result; This is a client

SOAP::Lite a collection of (many) modulesa collection of (many) modules –but they are loaded automatically when needed supports SOAP 1.1 specificationsupports SOAP 1.1 specification all methods can be used for both setting and retrieving values:all methods can be used for both setting and retrieving values: –if you provide no parameters, you will get current value, and if parameters are provided, a new value will be assigned to the object –and the method in question will return the current object (if not stated otherwise) which is is suitable for stacking these calls like: $lite = SOAP::Lite -> uri(’openBQS') -> proxy(' ;

Using “wsdl” - directly #!/usr/bin/perl -w use SOAP::Lite on_fault => sub {…}; print SOAP::Lite -> service ('file:/home/senger/ws-ws/perl/Hello.wsdl') -> setHelloMessage (123); getting “.wsdl” file by using its URLgetting “.wsdl” file by using its URL then, you do not need to worry about autotypingthen, you do not need to worry about autotyping #!/usr/bin/perl -w use SOAP::Lite on_fault => sub {…}; my $service = SOAP::Lite -> service ('file:./Hello.wsdl'); $service->setHelloMessage ($ARGV[0] or "Hello!!!"); print $service->getHelloMessage, "\n";

Why to use Web Services… (comparing to CORBA) WS are easier to deploy because of their firewall- friendlinessWS are easier to deploy because of their firewall- friendliness WS are quite well marketed (both from IT companies and Open Source projects)WS are quite well marketed (both from IT companies and Open Source projects) However:However: –user sessions are less standardised –many parts yet-to-be-done (notification, transactions, security, etc.) The programming effort and maintainability is similar to other distributed technologiesThe programming effort and maintainability is similar to other distributed technologies

1. What is similar The programming effort and maintainability is roughly the same both for Web Services and CORBAThe programming effort and maintainability is roughly the same both for Web Services and CORBA –For CORBA I need an ORB …but do you know anybody doing WS without a SOAP toolkit?…but do you know anybody doing WS without a SOAP toolkit? –For CORBA I need an IDL compiler …not always (ask Perl folks)…not always (ask Perl folks) …for WS you use frequently stubs generated from WSDL…for WS you use frequently stubs generated from WSDL –…similar answers for valuetype/custom encoding, etc.

2. What is (IMHO) better WS are easier to deploy because of their firewall- friendlinessWS are easier to deploy because of their firewall- friendliness WS are quite well marketed (both from IT companies and Open Source projects)WS are quite well marketed (both from IT companies and Open Source projects) Integration of WS into workflows seems to be very dynamic and very real topicIntegration of WS into workflows seems to be very dynamic and very real topic –comparing with CORBA Components

3. What is (IMHO) worse Peer-to-peer access is problematicPeer-to-peer access is problematic –notification by “server-push” is harder to achieve User sessions (server’s state-fullness) are less standardisedUser sessions (server’s state-fullness) are less standardised –…and therefore less inter-operable Many parts yet-to-be-done, or they are quite complex (notification, transactions, security, etc.)Many parts yet-to-be-done, or they are quite complex (notification, transactions, security, etc.)

So what? Don't throw the baby out with the bathwaterDon't throw the baby out with the bathwater –combine the existing projects with a new Web Services layer; in most cases it is not so difficult Apply existing standards to new Web Services projectsApply existing standards to new Web Services projects –think MDA – it may help, even without the whole OMG adoption process

Conclusions Distributed computing is inevitableDistributed computing is inevitable More accesses by programs than by clicking on hyperlinksMore accesses by programs than by clicking on hyperlinks More technologies of distributed architecture will collaborateMore technologies of distributed architecture will collaborate The better standards we have the better results we’ll getThe better standards we have the better results we’ll get Web Services is not a new hype but a trend to followWeb Services is not a new hype but a trend to follow