XML and Web Services (II/2546)

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Web Service Architecture
Siebel Web Services Siebel Web Services March, From
Overview of Web Services
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
SOAP.
1 Understanding Web Services Presented By: Woodas Lai.
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.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
A New Computing Paradigm. Overview of Web Services Over 66 percent of respondents to a 2001 InfoWorld magazine poll agreed that "Web services are likely.
Slide 1 EE557: Server-Side Development Lecturer: David Molloy Room: XG19 Mondays 10am-1pm Notes:
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Web Service What exactly are Web Services? To put it quite simply, they are yet another distributed computing technology (like CORBA, RMI, EJB, etc.).
1 CS 483 Enterprise and Web Application Programming Week 7 Web Services.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
WSDL Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Web Services Architecture1 - Deepti Agarwal. Web Services Architecture2 The Definition.. A Web service is a software system identified by a URI, whose.
1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
Lecture 15 Introduction to Web Services Web Service Applications.
Dodick Zulaimi Sudirman Lecture 14 Introduction to Web Service Pengantar Teknologi Internet Introduction to Internet Technology.
Web Services (SOAP, WSDL, UDDI) SNU OOPSLA Lab. October 2005.
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.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development using JSP and Web Services JSP and Web Services 18 th March 2005.
Chapter 10 Intro to SOAP and WSDL. Objectives By study in the chapter, you will be able to: Describe what is SOAP Exam the rules for creating a SOAP document.
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)
Copyright © 2013 Curt Hill SOAP Protocol for exchanging data and Enabling Web Services.
1 Web Services Web and Database Management System.
Enterprise Computing: Web Services
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
What is a Web Service? Distributed Computing Model Distributed Computing Model  Loosely Coupled, Course Grained  Standard HTTP Transport  Sync/Async.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
SOAP Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
1 G52IWS: Web Services Chris Greenhalgh. 2 Contents The World Wide Web Web Services example scenario Motivations Basic Operational Model Supporting standards.
Java Web Services CSCI 4300 Diagrams from the Sun Java Web Services Tutorial,
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.
INFSO-RI Enabling Grids for E-sciencE Web Services Mike Mineter National e-Science Centre, Edinburgh.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
EGEE is a project funded by the European Union under contract IST Introduction to Web Services 3 – 4 June
Web Services Blake Schernekau March 27 th, Learning Objectives Understand Web Services Understand Web Services Figure out SOAP and what it is used.
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.
SOAP, Web Service, WSDL Week 14 Web site:
Introduction to Server-Side Web Development Introduction to Server-Side Web Development using JSP and Web Services Session IV: JSP and Web Services 11.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
Java Web Services Orca Knowledge Center – Web Service key concepts.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Web Service Interview/VIVA
Implementing a service-oriented architecture using SOAP
WEB SERVICES DAVIDE ZERBINO.
Introduction to Web Services
Distributed System using Web Services
WEB SERVICES From Chapter 19, Distributed Systems
Distributed System using Web Services
Presentation transcript:

168493 XML and Web Services (II/2546) Kanda Runapongsa (krunapon@kku.ac.th) Dept. of Computer Engineering Khon Kaen University Dept. of Computer Engineering, Khon Kaen U.

168493: XML and Web Services (II/2546) Overview Introduction to Web Services Web Services Standards Java Support for Web Services Apache Axis Installing Apache Axis Invoking a service Deploying a service 168493: XML and Web Services (II/2546)

168493 XML and Web Services (II/2546) Web Services -- Basics Expose services to other processes Internet or intranet Black boxes Component-like, reusable Do not know how the service is implemented Based on open standards HTTP, XML, and SOAP Today there is a strong desire for easy-to-use and easy-to-create Web applications, and those applications are required to be language and platform independent. Web Services expose their functionality via standard Web protocols, like HTTP and XML, and enable you to interconnect Web applications. Broadly speaking, Web Services are URL-addressable resources that return requested information to a client or manipulate the data model behind the Web Service. Black boxes Like components, Web Services are black boxes and can be reused without knowledge about how the service is implemented. Based on open standards Web Services are based on open standards like HTTP, XML, and SOAP. So any application that supports these standards is able to support Web Services. 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

168493 XML and Web Services (II/2546) Web Services -- Basics Interconnect Applications Different clients Many devices Distribution and integration of application logic Web Services are loosely coupled Enable the programmable Web Not just purely interactive Web Interconnect With Web Services, you can easily connect applications – even via the Internet. Different clients can make use of Web Services. For example, a browser can make use of the functionality the service offers. Also Web Services themselves can communicate with each other or just call methods that are provided by other Web Services. And many different devices can consume Web Services. For example, a WAP device such as a mobile phone can invoke a Web Service. Distribution and integration of application logic A significant advantage of Web Services is that developers can program against a Web Service to import its functionality into their own Web Service to import its functionality into their own Web applications. We now have the technology to not only distribute application logic, but also to integrate functionality that is provided by a ‘service’ that resides ‘somewhere out there’ Web Services are loosely coupled Because Web Services are loosely coupled, you can change the implementation of a service without affecting the connected partner. The basic principle to achieve this is a homogeneous infrastructure that meets two requirements: First, we need underlying protocols that are common to all communicating entities. This is covered because Web Services are based on the aforementioned open standards. One important point to stress is that XML plays a major role here. Second, we need to ensure that communication takes place asynchronously through messages. Enable the “programmable Web” Because of these characteristics, Web Services enable the programmable Web. We are no longer restricted to a purely interactive Web. 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

168493: XML and Web Services (II/2546) Web Services -- Basics What is a ‘Web Service’? ‘Web’ accessible Usually implies accessible via HTTP Service architecture Request/response XML data transfer Many serious Web services in use for years Custom XML formats specific for each service 168493: XML and Web Services (II/2546)

Web Services -- Examples 168493 XML and Web Services (II/2546) Web Services -- Examples A Stock quote service The request asks for the current price of a specified stock The response gives the stock price A service that maps out an efficient route for the delivery of goods A business sends a request containing the delivery destinations The response returns the most cost-effective delivery route Web services, in the general meaning of the term, are services offered via the Web. In a typical Web services scenario, a business application sends a request to a service at a given URL using the SOAP protocol over HTTP. The service receives the request, process it, and returns a response. An often-cited example of a Web service is that of a stock quote service, in which the request asks for the current price of a specified stock, and the response gives the stock price. This is one of the simplest forms of a Web service in that the request is filled almost immediately, with the request and response being parts of the same method call. Another example could be a service that maps out an efficient route for the delivery of goods. In this case, a business sends a request containing the delivery destinations, which the service processes to determine the most cost-effective delivery route. 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

Web Services -- Examples 168493 XML and Web Services (II/2546) Web Services -- Examples Web services and consumers of Web services are typically businesses, making Web services predominantly business-to-business (B2B) transactions An enterprise can be the provider of Web services and also the consumer of other Web services Web services and consumers of Web services are typically businesses, making Web services predominantly business-to-business (B2B) transactions. An enterprise can be the provider of Web services and also the consumer of other Web services. For example, a wholesale distributor of rices could be the consumer role when it uses a Web services to check on the availability of rices and in the provider role when it supplies prospective customers with different vendor’s prices for rices. 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

Web Services Interaction Diagram UDDI Registry 1 Request WSDL location 2 Download WSDL WSDL Send SOAP messages With XML documents Web Services 3 168493: XML and Web Services (II/2546)

Web Services Infrastructure Language and platform independent infrastructure for loosely-coupled, inter-operable App2app communication over the Internet 168493: XML and Web Services (II/2546)

Web Services Infrastructure Language and platform independent Separation of specification and implementation Loosely coupled Message based, synchronous and asynchronous interactions 168493: XML and Web Services (II/2546)

Web Services Infrastructure Over the Internet No centralized control, use of established protocols, security considerations Inter-operable Standards based 168493: XML and Web Services (II/2546)

Early (Internet) Technologies SMTP/MINE: Protocols of Email FTP, NNTP HTTP/HTTPs, HTML The protocols behind the Internet’s popularity Most of these facilitated application to human interaction over the Internet/intranet 168493: XML and Web Services (II/2546)

Early (Intranet) Technologies 168493 XML and Web Services (II/2546) Early (Intranet) Technologies Distributed object model Components: packaging and interoperability Remoting: remote method invocation COM/DCOM from Microsoft, CORBA, Java RMI and EJBs If we are talked about distributed computing, we are talking about the client/server model. Today this term implicitly means three-tier architecture, where we have: First tier: user interface Second tier: business logic Third tier: database Normally each of these tiers resides on a dedicated machine. The first tier is on a client, which could be a browser. The second tier is on a server, in this case the Web server. The last tier could be, for example, a Microsoft SQL Server database. Distributed computing requires distributed object model or remoting architecture. With this you can develop distributed applications as you did with a local programming model, and even call services on remote systems. This is called remoted method invocation. Besides this we need the ability to interchange services – or components. Components are black boxes offering services or functionalities, and they provide for packaging and interoperability. The most import object models today are: COM: Component Object Model CORBA: Common Object Request Broker Architecture Java RMI and EJB: Java Remote Method Invocation and Enterprise JavaBeans. 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

168493 XML and Web Services (II/2546) What’s Wrong with That? Limited COM support on non-Windows platforms COBRA: Server object implementation not portable Most of these facilitated app2app within a trusted intranet and without much consideration to interoperability across different implementations Object models like COM, COBRA, and RMI tightly couple a service and the consumer of this service. This is a reason for the need of a homogeneous infrastructure. But there’s no guarantee that the service and the consumer use the same operating system, programming language, or object model. Another problem arises with versioning: if the implementation changes on one side, the other side will fail. Limited COM support on non-Windows platforms While COM is widely supported on the Windows platform, the support on non-Windows platforms like UNIX is limited. The usage of COM within Java requires the Microsoft Java Virtual Machines. This is really an issue, because Microsoft JVM is not supported on non-Windows platforms. From the beginning COBRA was designed to target the problem of inter-machine communication, providing for cross-language and cross-platform interoperability. However, since COBRA is a specification – not a product – implementation of COBRA are vendor specific. So, if you make use of vendor-specific features or services, your applications may not be portable. With Enterprise JavaBeans, you are tied to one language: Java 168493: XML and Web Services (II/2546) Dept. of Computer Engineering, Khon Kaen U.

App2App Interaction – the Web Services Way Transport protocol HTTP/HTTPS Data encoding SOAP (Simple Object Access Protocol) XML Schema Interface Description WSDL (Web Services Description Language) 168493: XML and Web Services (II/2546)

The Web Services Way (Cont) Service Description and Discovery UDDI (Universal Description, Discovery and Integration) Security WS-Security, XML-Signature, XML-Encryption 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) What is SOAP? Simple Object Access Protocol It defines a standard packaging format for transmitting XML data between applications on a network Usually request-response structure Transport normally HTTP, but can be anything (SMTP, etc.) 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) A SOAP Message A SOAP message is just an XML document The message might be sent from one application to another to synchronize contact information on two different systems SOAP takes advantages of XML namespaces and XML schemas 168493: XML and Web Services (II/2546)

SOAP Message Structure Envelope is wrapper for content, but no useful information Optional header can contain control information Body contains actual data in XML encoding Attachments can hold other types of data (binary, etc.) SOAP Envelope: Top-level wrapper SOAP Header (Optional): Extension information SOAP Body: Application data 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) A SOAP Message Example <?xml version=“1.0” encoding=“UTF-8”?> <soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”> xmlns:addr=“http://www.abc.com/jwsbook/bookQuote”> 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) A Soap Message Example <soap:Body> <addr:address> <addr:name>Amazon.com</addr:name> <addr:zip>90952</addr:zip> </addr:address> </soap:Body> </soap:Envelope> 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) WSDL Web Services Description Language A standard for describing the structure of the XML data exchanged between two systems using SOAP When you create a new Web service, you can also create a WSDL document that describes about the type of data we are exchanging 168493: XML and Web Services (II/2546)

WSDL 1.1 Document Structure A WSDL document describes What the service can do Where it resides How to invoke it WSDL descriptions can be made available from an UDDI registry Types Messages Port Types Bindings Services 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Why Do We Need UDDI? Universal Description, Discovery, and Integration We still need a guidance to find the WSDL documents UDDI can help others find our Web services easily and use them to communicate with our Web services 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) What is UDDI? UDDI defines a standard set of Web service operations that are used to store and look up information about other Web service applications UDDI defines a standard SOAP-based interface for a Web services registry A UDDI is often referred to as a “Yellow Pages” for Web services 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Java APIs for XML Java API for XML Processing (JAXP) – Process XML documents using various parsers Java API for XML-based RPC (JAX-RPC) – sends SOAP method calls Java API for XML Registries (JAXR) – provides a standard way to access 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Apache Axis Apache Axis is a toolkit to create and consume Web Services for the Java platform which can be downloaded from http://ws.apache.org/axis/index.html Axis 1.1 supports numerous Java technologies SAAJ (SOAP with Attachments API for XML) JAX-RPC (Java API for XML based Remote Procedure Call) 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Apache Axis A simple stand-alone server A server which plugs into servlet engines such as Tomcat Extensive support for the Web Service Description Language (WSDL) Emitter tooling that generates Java classes from WSDL A tool for monitoring TCP/IP packets 168493: XML and Web Services (II/2546)

Apache Axis – Web Service Create an object that has methods and publish it on the Internet You can access your Web service just like if it was a local object through a protocol called SOAP All the operations of a Web service are expressed through a WSDL The WSDL file is used to access and call operations on Web services 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Concepts: SOAP & AXIS Apache Axis is an Open Source SOAP server and client SOAP is a mechanism for inter-application communication between systems written in arbitrary languages, across the Internet 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Concepts: SOAP & AXIS SOAP usually exchanges messages over HTTP The client POSTs a SOAP request The client then receives either An HTTP success code and a SOAP response Or an HTTP error code Open Source means that you get the source, but there is no formal support 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Concepts: SOAP & AXIS SOAP messages are XML messages These messages exchange structured information between SOAP systems Messages consist of one or more SOAP elements inside an envelope, Headers, and the SOAP Body 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Concepts: SOAP & AXIS Axis handles the magic of converting Java objects to SOAP data when it sends it over the wire or receive results SOAP Faults are sent by the server when something goes wrong; Axis converts these to Java exceptions 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) Concepts: SOAP & AXIS Axis implements the JAX-RPC API, one of the standard ways to program Java services Axis is compiled in the JAR file axis.jar; it implements the JAX-RPC API declared in the JAR files jaxrpc.jar and saaj.jar 168493: XML and Web Services (II/2546)

168493: XML and Web Services (II/2546) References Web Services with JAX-RPC and Axis http://pankaj-k.net/axis4tag/ 168493: XML and Web Services (II/2546)