INFOSYS 290, Section 3, Fall 2005, Web Services: Concepts, Design and Implementation Adam Blum Lecture 4: Creating Web Services.

Slides:



Advertisements
Similar presentations
Generalized Requests. The current definition They are defined in MPI 2 under the hood of the chapter 8 (External Interfaces) Page 166 line 16 The objective.
Advertisements

TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
XML Web Services Monash University Semester 1, March 2006.
Slickr : A Capstone Web Development Project Using Databases, ASP.NET, Web Services, and AJAX Mark Frydenberg Computer Information Systems Dept. Bentley.
XML Web Services in Visual Studio ®.NET NameTitleCompany.
ASP.Net, web services--- asynchronous and synchronous and AJAX By Thakur Rashmi Singh.
Technical Architectures
T Sponsors Sameer Chabungbam Principal Program Manager, Microsoft Connector API Apps BizTalk Summit 2015 – London ExCeL London | April 13th & 14th.
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
INFOSYS 290, Section 3 Web Services: Concepts, Design and Implementation Adam Blum
Peoplesoft: Building and Consuming Web Services
Object-Oriented Analysis and Design
Chapter 12 Extending Web Applications. ASP.NET 2.0, Third Edition2.
Maintaining and Updating Windows Server 2008
Generation of WEB SERVICES Using PROGRAM SLICING RAVINDRA KUMAR SUDIP AKURA AMIT KUMAR BALKARAN SINGH SIDHU
1 Web Services Visual C# 2008 Step by Step Chapter 30.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 19 Microsoft’s Approach 1 –.NET Mobile Framework part 2 Rob.
E-Quotes A Suite for Dynamic Integration of Stock Exchange Web Services Ajay Mansata Arpan Biswas Gaurav Sharma Sameer Yeolekar.
A Choice between Interoperability and Migration By Chaitanya Kurada Masters Defense Major professor: Dr.Daniel Andresen.
XML Web Services in Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
CIS 451: Web Services Dr. Ralph D. Westfall March, 2009.
AJAX in ASP.NET James Crowley Developer Fusion
Microsoft.NET Platform Adam Seligman Strategy Advisor and.NET Agitator
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Using the Actions Pane, Host Controls, and Smart Tags
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Lecture 15 Introduction to Web Services Web Service Applications.
Web Services Week 7 Aims: A detailed look at the underlying mechanisms for communication between web services Objectives: SOAP, WSDL, UDDI.
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.
.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.
DAT 330 Building Web Services with SQL Server and SQLXML 3.0 Alexander Vaschillo Lead Program Manager WebData XML Group Microsoft Corporation.
© Chinese University, CSE Dept. Distributed Systems / Simple Example Open Microsoft Visual Studio 2005:
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Web Services BOF This is a proposed new working group coming out of the Grid Computing Environments Research Group, as an outgrowth of their investigations.
INFOSYS 290, Section 3, Fall 2005, Web Services: Concepts, Design and Implementation Adam Blum Lecture 2: Describe and Invoke - SOAP and.
Course Schedule Report Web Service Carolyn Cracraft Lisa de Larios-Heiman.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 7: BPEL Some notes selected from.
ADVANCED WEB SERVICES. Three Advanced Web Service Techniques SOAP Extensions Asynchronous calls Custom wire formatting SOAP Extensions Asynchronous calls.
Introducing BPEL Concepts Oracle BPEL Process Manager.
Telerik Software Academy Web Services & Cloud.
.  A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate.  Taken advantage of Spring’s multi layer injection.
Electronic Payment Systems (1)
IAsyncResult ar = BeginSomething(…); // Do other work, checking ar.IsCompleted int result = EndSomething(ar);
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
Module 9: Using XML Web Services in a C# Application.
C# 1 Web services CSC 298. C# 2 Web services  A technology to make libraries available across the internet.  In Visual Studio,  can create a web service.
Web Services from 10,000 feet Part I Tom Perkins NTPCUG CertSIG XML Web Services.
Web Services An Introduction Copyright © Curt Hill.
.NET Mobile Application Development XML Web Services.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
3/18/2002AIM AB Review of WSRP/WSIA Adaptation Description Language, Past and Present Directions. Ravi Konuru, IBM.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
OE-NIK HP Advanced Programming Web services Standards and protocols Using web services Using web services with asynchronous calls.
1 Seminar on SOA Seminar on Service Oriented Architecture BPEL Some notes selected from “Business Process Execution Language for Web Services” by Matjaz.
WEB SERVICES.
The future of distributed systems architecture
Lecture 1: Multi-tier Architecture Overview
Asynchronous Programming
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Deepak Shenoy Agni Software
Web Service.
Presentation transcript:

INFOSYS 290, Section 3, Fall 2005, Web Services: Concepts, Design and Implementation Adam Blum Lecture 4: Creating Web Services

Today’s Content Creating Web Services Overview Demo Web Service Creation –Raw computation –Database –HTML scraping –XML wrapping –SOAP web service wrapping Break To Set Up Environments –MindReef SOAPScope –AboveAll –Visual Studio Redemo of Consuming Web Services – MindReef –AboveAll –Visual Studio Lecture: Asynchronous Web Services

Creating Web Services Create a web service project Design the interface –Demoing “method-oriented interfaces” today Place [WebMethod] around the exposed methods Write your internal logic Test with Visual Studio and debug

Example Web Services Demonstrating Various Techniques Raw computation –PokerOdds ( 3/f05/samples/PokerOdds) Database creation –ProjectTraq –Workouts XML wrapping –Blogs ( 3/f05/samples/PokerOdds) –SportsBetLines ( 3/f05/samples/PokerOdds) HTML/HTTP scraping –PokerOdds AnalyzeHands() SOAP web service wrapping –SalesForce

Informational Web Services QCUD Multiple records in query Doesn’t have to have CUD Richly descriptive records Generally comes from a persisted store Contrast with computation or transactional web service

Informational Web Service Examples Sales accounts, contacts, tasks, opportunities Project bugs Helpdesk, customer support items Blog entries Newsfeeds

Consuming Web Services Ad hoc tools and management systems –E.g. MindReef SOAPScope Forms design environments –E.g. AboveAll Studio Third generation traditional programming environments –E.g. Visual Studio.NET 2005

Asynchronous Web Services

Why Asynchronous Web Services? Speed –Due to overhead of XML and http XML web services can be SLOW Unpredictability –Your app may be invoking a web service that itself is slow, unreliably available or involves a human in the process Size –Moving to larger coarsegrained documents and less frequent chatty method calls can introduce more overhead Blocking on downstream services creates instant bottlenecks in your application

Creating Asynchronous Web Services Write “begin” and “end” methods versus single invocation methods VisualStudio.NET generates: –public System.IAsyncResult BeginValidate Address(string Address, System.AsyncCallback callback, object asyncState) { – return this.BeginInvoke("Validate Address", new object[] { Address}, callback, asyncState); –} –public Check Result EndValidate Address(System.IsyncResult asyncResult) { – object[] results = this.EndInvoke(asyncResult); – return ((Check Result)(results[0])); –}

Invoking Asynchronous Web Services Polling Blocking Callbacks

Polling // polling version private void Command1_Click(object sender, System.EventArgs e) { validatorproxy=new Einsteinware. Services(); int start=DateTime.Now.Second; IAsyncResult ar= validatorproxy.BeginValidate Address(TextBox1.Text, null,null); while (!ar.IsCompleted){ –//do stuff } switch( validatorproxy.EndValidate Address(ar)){ –case Einsteinware.Check Result.Valid: Label1.Text="Valid"; break; –default: Label1.Text="Invalid"; break; }

Blocking private void Command1_Click(object sender, System.EventArgs e) { validatorproxy=new Einsteinware. Services(); IAsyncResult ar= validatorproxy.BeginValidate Address(TextBox1. Text,cb, validatorproxy); // do lots of stuff ar.AsyncWaitHandle.WaitOne(); switch(response) { case Einsteinware.Check Result.Valid: Label1.Text="Valid"; break; default: Label1.Text="Invalid"; }

WaitHandle Object WaitOne –Waits for this one handle WaitAny –Static method which takes array of WaitHandles, returns when any have completed WaitAll –Returns when all have completed

Invoking with a Callback // callback version private void Command1_Click(object sender, System.EventArgs e) { validatorproxy=new Einsteinware. Services(); // instantiate the AsyncCallback delegate AsyncCallback cb = new AsyncCallback( validatorCallback); int start=DateTime.Now; IAsyncResult ar= validatorproxy.BeginValidate Address( TextBox1.Text,cb,null); Label1.Text=Label1.Text + "(" + System.Convert.ToString( DateTime.Now.CompareTo(start) ")"; }

The Callback Itself public delegate void MyDelegate(Label l,String s); private void validatorCallback(System.IAsyncResult ar) { Check Result response= validatorproxy.EndValidate Address(ar); switch(response) { case Check Result.Valid: message="Valid"; break; … } responseLabel.Invoke( new MyDelegate(DisplayResponse),new object[]{label1,message}); } private void DisplayResponse(Label label,String message) { label.Text=message; Form1.ActiveForm.Refresh(); } Remember: callbacks are on a separate thread and need a way to communicate back to the main thread to display…hence delegates

Using the Async State Object // using async state to handle two label objects private void button1_Click(object sender, System.EventArgs e) { label1.Text="";label2.Text=""; validatorproxy=new Einsteinware. Services(); IAsyncResult ar= validatorproxy.BeginValidate Address( textBox1.Text,new AsyncCallback( validatorCallback),label1); IAsyncResult ar2= validatorproxy.BeginValidate Address( textBox1.Text,new AsyncCallback( validatorCallback),label2); }

Callback Using the Async State Object private void validatorCallback(System.IAsyncResult ar) { –Check Result response= validatorproxy.EndValidate Address(ar); –String message=""; –switch(response) –{ –case EinsteinwareCheck Result.Valid: message="Valid“; break; –case Check Result.InvalidUser: message="Invalid user"; break; … –} –Label responseLabel = (Label)ar.AsyncState; –responseLabel.Invoke(new MyDelegate(DisplayResponse),new object[]{responseLabel,message}); }

Course Project Goal –Build “web service consuming” client applications from desktops and mobile devices Requirements –Use an “informational” web service Has QCUD (Query, Create, Update and Delete operations) Query returns MULTIPLE records –Consume web service from AboveAll or Visual Studio for desktop –Consume WS from GoodAccess Web Services or Visual Studio from mobile device –Optionally write or enhance a backend web service Possibly as a “proxy web service” layer on top of original web service Only if previous steps are achieved –Demo to class –Write up as three page paper including: architecture and UI design Team size –Two people per project Proposal –Due today, will accept later

References Specs –SOAP Specification, –WSDL Specification, –UDDI Specification, Tools –Visual Studio, –Microsoft Web Services Enhancements

How To Reach Me Office hours Thursday at 4pm