CSCI 6962: Server-side Design and Programming Web Services.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

SOAP.
RPC Robert Grimm New York University Remote Procedure Calls.
C# and Windows Programming Application Domains and Remoting.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
Introduction to push technology © 2009 Research In Motion Limited.
Remote Object Invocation
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 42 Web Services.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
DISTRIBUTED FILE SYSTEM USING RMI
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Client-server interactions in Mobile Applications.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
INTRODUCTION TO WEB DATABASE PROGRAMMING
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
A Simplified Approach to Web Service Development Peter Kelly Paul Coddington Andrew Wendelborn.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Enabling Embedded Systems to access Internet Resources.
1 HRS2422 Web Services JAX-WS and SOAP Introduction  Web service – A software component stored on one computer that can be accessed via method.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
Web Services An introduction for eWiSACWIS May 2008.
Lecture 15 Introduction to Web Services Web Service Applications.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
Cross Site Integration “mashups” cross site scripting.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Distributed Programming CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Java Remote Method Invocation RMI. Idea If objects communicate with each other on one JVM why not do the same on several JVM’s? If objects communicate.
XML Web Service. Overview of XML Web Service ASP.NET XML Web services enable you to remotely access the properties and methods of classes across a network.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Getting Started with OPC.NET OPC.NET Software Client Interface Client Base Server Base OPC Wrapper OPC COM Server Server Interface WCF Alternate.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
1 Installing and Maintaining ISA Server Planning an ISA Server Deployment Understand the current network infrastructure. Review company security.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
1 Alternative view on Internet Computing Web 1.0 –Web 1.0 is first generation, Web Information based. Driven by Information provider. Web 2.0 Ajax enabled.
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
WSDL : Web Service Definition Language Dr. Yuhong Yan NRC-IIT-Fredericton Internet logic.
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.
JavaScript and Ajax (Internet Background) Week 1 Web site:
COMP2322 Lab 4 Socket Programming Toby Lam March 2, 2016.
Feeling RESTful? Well, first we’ll define a Web Service –A web page meant to be consumed by a computer via an autonomous program as opposed to a web browser.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
OE-NIK HP Advanced Programming Web services Standards and protocols Using web services Using web services with asynchronous calls.
Web Services Essentials. What is a web service? web service: software functionality that can be invoked through the internet using common protocols like.
Java Distributed Computing
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
WEB SERVICES.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Chapter 42 Web Services.
Presentation transcript:

CSCI 6962: Server-side Design and Programming Web Services

Remote Function Calls Function calls: –Caller passes parameters to function –Function returns value Advantages –Much cleaner syntax than passing parameters in request public int add (int a, int b) { return a + b; } Function public int whatever () { … x = 7; y = 5; z = add(x, y); … } Call

Remote Function Calls Key idea: Function call should still work even if caller, callee at different locations in network Example: RMI for Java (Remote Method Invocation) –Passed “serializable” objects with built-in methods to convert to/from string public int add (int a, int b) { return a + b; } public int whatever () { … z = add(x, y); … } Call over network Consumer Producer

Remote Function Calls Problem: Passing complex parameters over network –Information sent as strings over network public int add (int a, int b) { return a + b; } public void whatever () { x = 7; y = 5; z = add(x, y); } Easy to pass 5 and 7 as strings public void storeCart (ShoppingCart c) { … } public void whatever () { storeCart(myCart) } What does a “ShoppingCart” look like when sent over network?

Remote Method Call Problems Requires client and server to use same language –Should be more flexible Remote calls often seen as attacks by firewalls –Html preferable for sending information int add (int a, int b) { return a + b; } whatever () { cin >> x >> y; z = add(x, y); } Method in Java Function in C

Web Services Solution Simulate remote method calls with existing client/server structure –Method call = request –Return value = response –Not considered attack by firewall –Also supports https: for secure transmissions Common standards: –SOAP (Simple Object Access Protocol) –REST (Representational State Transfer)

Web Services Solution Simulate remote method calls with existing client/server structure –Method call = request –Return value = response –Not considered attack by firewall –Also supports https: for secure transmissions Format of calls based on XML –Common language specification for internet

SOAP Format of calls based on XML –Common language specification for internet –Generally requires proxy classes in client to translate objects into XML format JAX-WS libraries for Java WCF (Windows Communication Foundation) libraries in ASP Cliente Client code Proxy classes Servere Web Service method SOAP

XML Format Simple example: web service to compute k = i + j

REST Services Alternative: REST (Representational State Transfer) –Information transmitted in JSON (JavaScript Object Notation) –Can be directly consumed by JavaScript Good if AJAX used

Creating a Web Service in NetBeans Reference: Will probably need to modify configuration files of IDE/Glassfish Create new web site project Add new web service to the project –Must have a package in URL format (fake address of org.me.greeter) Added to project as web service node

Adding a Web Service Operation Right click service node and choose Add Operation Will be prompted for: –Return type –Types and names of parameters New operation added as node to project

Adding a Web Service Operation Note that NetBeans can handle complex parameter classes –Must implement serializable interface

Adding a Web Service Operation Source code will now contain “skeleton” of method Modify as necessary

Testing a Web Service Operation Right click project and deploy Right click web service and choose Test Web Service Will get “test window” for each method to enter parameters Can view return value and underlying XML

Creating a Web Client Create as Java application Add new Web Service Client –Will be prompted for the web service in projects New (empty) method automatically generated in source packages

Creating a Web Client Expand Web Service References –Will have nodes for all operations in the corresponding web service Drag node of operation to call into the class

Creating a Web Client Add code (probably in main) to call that method with desired parameters The method then invokes the corresponding method in the web service