Lecture 12: Web Services. 12-2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “Web Services are objects callable across a network.

Slides:



Advertisements
Similar presentations
Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Advertisements

1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
© 2002 D & D Enterprises 1 Linking Images For Navigation & Clickable Image Maps.
IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Datamax/MCL Off-Line License Activation Method
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Nick Feamster CS 6262 Spring 2009
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Enterprise Java and Data Services Designing for Broadly Available Grid Data Access Services.
1 DTI/EPSRC 7 th June 2005 Reacting to HCI Devices: Initial Work Using Resource Ontologies with RAVE Dr. Ian Grimstead Richard Potter BSc(Hons)
4. Internet Programming ENG224 INFORMATION TECHNOLOGY – Part I
Overview Environment for Internet database connectivity
The Internet and the World Wide Web. Una DooneySlide 2Internet and WWW What is the Internet? This is the physical infrastructure or backbone of computers,
Representational State Transfer (REST): Representing Information in Web 2.0 Applications this is the presentation Emilio F Zegarra CS 2650.
Building and using REST information services Rion Dooley.
How are we CREATING Your Web and Global Presence.
1 WSDL: Web Service Description Language Gary Sharp Mike Breakiron.
Application Server Based on SoftSwitch
ABC Technology Project
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
Basic HTML Workshop LIS Web Team Spring 2007.
Introduction to ASP.NET MVC
31242/32549 Advanced Internet Programming Advanced Java Programming
Getting Familiar with Web Pages 1 2 The Internet Worldwide collection of interconnected computer networks that enables businesses, organizations, governments,
1 Incorporating XML with Mobile Devices and ASP.NET casey chesnut brains-N-brawn.com 4/4/2005 Student Ambassadors.
Learning the Basics – Lesson 1
Addition 1’s to 20.
California SAWS Consortium IV (C-IV) System
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
® Microsoft Office 2010 Browser and Basics.
Test B, 100 Subtraction Facts
Week 1.
1 Nordjyllands Erhvervakademi Web Services Purpose Examples of Web Services Architecture Web Services in.Net.
South Dakota Library Network MetaLib Management Basics Updating Resources South Dakota Library Network 1200 University, Unit 9672 Spearfish, SD
1 Web Services Based partially on Sun Java Tutorial at Also, XML, Java and the Future of The Web, Jon Bosak. And WSDL.
Presentation 10 SOAP on the Microsoft Platform (.NET)
Creating Windows Store Apps. 1. Overview of Windows Store applications 2. Worked example 3. Adding controls and event handlers Contents 2.
8. Web-based Apps in.NET. 2 Microsoft Objectives “Real-world applications are typically multi-tier, distributed designs involving many components — the.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
Introduction to ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Static vs. Dynamic Web Pages.NET Framework Installing ASP.NET First.
9. Web Services. 2 Microsoft Objectives “Web Services are poised to change the future of software development...” WebServices.
1 Software Testing and Quality Assurance Lecture 32 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
CS590VC – Tutorial 9 Calling Web Services from Second life.
Lecture 7: WinForms & Controls, Part MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “Visual Studio.NET ships with a wealth.
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.
WWW Forms and Search. Forms URL - always fetch a particular page What if the information we want varies from time to time and from user to user?
.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.
Fundamentals of Web Publishing MIS 208-B LEC: T 08:15PM-10:05PM- ADM102 LAB: TH 08:15PM-10:05PM - ADM138 Andy Stokes.
C# AND ASP.NET What will I do in this course?. MAJOR TOPICS Learn to program in the C# language with the Visual Studio IDE (Interactive Development Environment)
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Web Services from 10,000 feet Part I Tom Perkins NTPCUG CertSIG XML Web Services.
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 the World Wide Web & Internet CIS 101.
The Internet What is the Internet? The Internet is a lot of computers over the whole world connected together so that they can share information. It.
The Internet Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
The Internet and Electronic Mail
Presentation transcript:

Lecture 12: Web Services

12-2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Objectives “Web Services are objects callable across a network. The magic is that web services are platform-independent, for the first time allowing easy creation of heterogeneous systems...” Background Some demos Consuming a web service Creating a web service

12-3 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Part 1 Background…

12-4 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Web-based applications Web server should be viewed as just another application tier Motivation: –web-based app is now accessible across the internet –web-based app is now accessible from *any* client platform obj Web server Client Web Page Server

12-5 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Types of web applications Two types: –Web forms :web app returns HTML — i.e. data + presentation –Web services :web app returns XML — just the raw data obj browser Web server HTML Web Page app Server Web Service XML

12-6 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (1) Web forms An example of a traditional HTML-based web app: Browser Web server Web Page (1) (2) HTML WebForm1. (3) view

12-7 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Problems with form-based web apps Data intermixed with HTML –what if I just want the data? Based on user – computer interaction –what if I want to connect computers? Web services created to solve these problems…

12-8 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (2) Web services Here's a GUI app built using a calculator web service… GUI.exe Web server Web Service (3) XML 119 (1) XML obj int Add(int x, int y) { return x + y; } (2) call (4) view

12-9 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Part 2 Demos…

12-10 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Demo #1 Amazon web service –Amazon.com makes product info available via a web service –10% of their business is currently generated this way

12-11 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Demo #2 TerraServer web service –TerraServer contains global satellite images of Earth's surface –freely-available via this Microsoft-sponsored web service

12-12 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Part 3 Consuming a web service…

12-13 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Example Let's create a client that consumes a web service… Google WebService App : –GUI app that performs internet search using Google! –keep in mind that Google is a web-farm of Linux machines 5-step process: 1.sign-up for a free Google account 2.create WinForm app as usual 3.set reference to Google web service 4.call Google service like any other object 5.run!

12-14 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (1) Getting a Google account It's free! Surf to –follow step 2 to create a Google account (painless) –reply to verification –you'll receive login key, e.g. "4a8/TvZQFH…"

12-15 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (2) Creating WinForm app Create client-side WinForm app as you normally would: WebBrowser controlListBox

12-16 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (3) Referencing Google web service Recall that you must reference a component before using it In the case of web services, set a Web Reference … –for Google, reference

12-17 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET What did setting a reference really do? Setting a web reference requests WSDL doc from service –WSDL = Web Service Description Language –formal description of interface between client & service Client Web server Web Service WSDL document

12-18 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (4) Calling Google service Now create Google search object & call! public void cmdSearch_Click(...) { GoogleSearchService google; GoogleSearchResult results; // ask google to search for us... google = new GoogleSearchService(); results = google.doGoogleSearch("4a8/TvZQFHID0WIWnL1CMmMx0sNqhG8H", txtSearch.get_Text(), 0, 10, false, "", false, "", "", ""); // display resulting URLs... for (int i=0; i<results.resultElements.length; i++) lstURLs.get_Items().Add( results.resultElements[i].URL ); } public void cmdSearch_Click(...) { GoogleSearchService google; GoogleSearchResult results; // ask google to search for us... google = new GoogleSearchService(); results = google.doGoogleSearch("4a8/TvZQFHID0WIWnL1CMmMx0sNqhG8H", txtSearch.get_Text(), 0, 10, false, "", false, "", "", ""); // display resulting URLs... for (int i=0; i<results.resultElements.length; i++) lstURLs.get_Items().Add( results.resultElements[i].URL ); }

12-19 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (5) Run!

12-20 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET What we just did… Connected two computers across the internet –we're running Windows –Google is running Linux And we did it via standard OOP –no network programming, no TCP/IP, no XML, no …

12-21 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET How does it really work? Based on RPC (Remote Procedure Call) architecture: –client calls proxy, which builds msg & sends to server –corresponding stub on server receives msg & calls object obj Web server obj client app proxy method call HTTP request SOAP msg (XML) stub web service method call WSDL

12-22 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Why does Google do this? Amazon? Make $$ –they charge commercial customers per search / sale…

12-23 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Why are web services important? Work on any platform: –Mac OS X, Windows, Linux,... Work with most programming languages: –J#, Java, C, C++, VB, C#, … Work with old, legacy hardware: –new systems can interact with old…

12-24 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Part 4 Creating a web service…

12-25 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Creating a web service Trivial to do if you're using Visual Studio.NET… –note that IIS must be installed for this to work with VS.NET

12-26 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (1) Select template Start by creating a project of type “ASP.NET Web Service”

12-27 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET (2) Code as usual Web service is just a class with web-callable methods –denoted by WebMethod attribute –code, build, & that's it! public class Service1 extends System.Web.Services.WebService { WebMethod() */ public int Add(int x, int y) { return x + y; }. } public class Service1 extends System.Web.Services.WebService { WebMethod() */ public int Add(int x, int y) { return x + y; }. }

12-28 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET To use this web service… Give your clients these URLs: –WSDL: –Web reference:

12-29 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET Summary Pretty powerful stuff! –OO construction of heterogeneous systems Based on lots of technology: –XML for data format –SOAP as communication protocol –WSDL for formal description of web service –ASP.NET, the web component of.NET –proxy-stub distributed design