1 CS 3870/CS 5870: Note 20 Web Service. 2 What is Web Service? Providing functionality online to other applications, Web and Windows applications. The.

Slides:



Advertisements
Similar presentations
Siebel Web Services Siebel Web Services March, From
Advertisements

1 CS 3870/CS 5870: Lab4 Save with Invalid Price Keep Order After Updating.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
Introduction to Web Services Yossi Amir Itzik Kasovitch.
1 Web Services I: Returning Data in XML Format. 2 Service-Oriented Architecture (SOA) Old Model for Applications Executables running on individual computers.
Introduction to ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Static vs. Dynamic Web Pages.NET Framework Installing ASP.NET First.
Introduction to Web Application Development with.Net and Web Service ISYS 350.
XML Web Services ASP.NET. Overview of Web Services (Page 1) Web Service – Part or all of a Web application that is publicly exposed so that other applications.
9. Web Services. 2 Microsoft Objectives “Web Services are poised to change the future of software development...” WebServices.
Mark Dixon Page 1 20 – Web applications: Writing data to Databases using ASP.
Introduction to Web Service ISYS 512. Web Service XML Web Service Web services are classes that are stored on the web which can instantiate and use in.
INTRODUCTION TO WEB SERVICES CS 795. What is a Web Service ? Web service is a means by which computers talk to each other over the web using HTTP and.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
Microsoft ® ASP.NET Presented by Joseph J. Sarna Jr. JJS Systems, LLC.
Mark Dixon 1 22 – Web applications: Writing data to Databases using ASP.Net.
Mark Dixon Page 1 23 – Web applications: Writing data to Databases using ASP.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
CSCI 6962: Server-side Design and Programming Web Services.
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.
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Internet Technologies and Web Application Web Services With ASP.NET Tutorial: Introduction to.
.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.
1.NET Web Forms Web Services © 2002 by Jerry Post.
1 CS 3870/CS 5870: Note 11 Authentication and Authorization Membership Provider.
© Chinese University, CSE Dept. Distributed Systems / Simple Example Open Microsoft Visual Studio 2005:
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
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.
1 CS 3870/CS 5870: Note05 Prog3 Web Application with Database.
1 CS 3870/CS 5870: Note 19 SiteMap and AJAX Lab 8.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
Week Six : Writing Web Services Aims: Creating and Consuming student’s first Web Services Learning Outcomes: Familiarity with VS.NET for creating and consuming.
1 CS387/CS587: Note 08 Shopping Bag DataTable. 2 DataClass Public Shared Function NewShoppingBag() As Data.DataTable Dim bag As New Data.DataTable bag.Columns.Add("Product.
Module 9: Using XML Web Services in a C# Application.
Chapter 7: Creating and Consuming XML Web Services Understanding XML Web Services Creating XML Web Services Deploying and Discovering XML Web Services.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
1 CS387/CS587: Note05 Lab 3. 2 Global.asax Must not be under any sub-folder Application_Start Application_End Application_Error Session_Start Session_End.
1 CS 3870/CS 5870: Note 12 Authentication and Authorization Membership Provider.
1 CS 3870/CS 5870: Note 16 Web User Controls. Prog 7 Copy Prog6 to Prog7 Modify all files for Prog7 Remove Web.config from sub-folders Make sure Prog7.
1 CS387/CS587: Note04 Lab 3. 2 Master Page All Web pages will be similar Should be created before other web pages Add New Items Controls on the Master.
1 CS 3870/CS 5870: Note 13 Web Service. 2 What is Web Service? Providing functionality online to other Web applications SOAP Simple Object Access Protocol.
1 CS 3870/CS 5870: Note 14. Prog5 Due 10 PM Wednesday, Oct 21 Authentication and Authorization 2.
.NET Mobile Application Development XML Web Services.
1 CS 3870/CS 5870: Note 19 AJAX Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
CS 3870/CS 5870 Web Service.
28 Web Services.
Session Variables and Post Back
z/Ware 2.0 Technical Overview
How to Create a Simple Web Service and Use it in ASP.Net
PHP / MySQL Introduction
INTRODUCTION TO WEB SERVICES CS 795. What is a Web Service ? Web service is a means by which computers talk to each other over the web using HTTP and.
Web Services Introduction
CS 3870/CS 5870 Web User Controls Events (II).
Application Infrastructure
Consuming Webservice in AX 2012
CS 3870/CS 5870 Test 2 (50 points) Thursday
Chapter 42 Web Services.
Presentation transcript:

1 CS 3870/CS 5870: Note 20 Web Service

2 What is Web Service? Providing functionality online to other applications, Web and Windows applications. The original Goal of MS ASP.NET To enable developers to build and consume Web services with easy

Communication Between Disparate Systems Systems within an organization –Unix –Windows –Mac –Others Various systems need to talk with one another –Not an easy job 3

XML XML: eXtensible Makeup Language –Simpler version of SGML (Standard Generalized Makeup Language) –Best choice for disparate systems for now SOAP Simple Object Access Protocol 4

Previous Attempts DCOM Distributed Component Object Model RMI Remote Method Invocation CORBA:... IIOP:... Driven by a single vendor or Very vendor specific 5

6 Creating Web Service Add New Items Web Service –Specify Name File WebService.asmx File WebService.vb –under App_Code

7 WebService Page Directive File WebService.asmx WebService Language="VB" CodeBehind="~/App_Code/WebService.vb" Class="WebService" %>

8 Web Service Class (VB File) Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols ‘ To allow this Web Service to be called from script, ‘ using ASP.NET AJAX, uncomment the following line. ‘ _ _ Public Class WebService Inherits System.Web.Services.WebService... End Class

9 Web Service Class Web Service Namespace –Default : –Change to: ScriptService: AJAX Service.Protocols –SOAP can be used in VB.NET

10 Web Service Class Public Class WebService Inherits System.Web.Services.WebService _ Public Function HelloWorld() As String Return "Hello" End Function _ Public Function WS_GetAllProducts() As Data.DataTable... ‘ Return a datatable End Function End Class

11 Looking at Web Service Go to the Web Service URL:

SOAP SOAP Envelop SOAP Body 12

13 Web Service Class _ Public Class WebService Inherits System.Web.Services.WebService ‘ Create new web methods _ Public Sub WS_UpdateProduct(...)... End Sub End Class

14 Web Service Class _ Public Class WebService Inherits System.Web.Services.WebService ‘ Insert a new record into the table Public Sub WS_InsertProduct(...)... End Sub End Class

15 Web Service Class _ Public Class WebService Inherits System.Web.Services.WebService ‘ Insert a new record into the table _ Public Sub WS_InsertProduct(...)... End Sub End Class Must have _

16 Consuming Web Service Adding Web Reference Invoking Web Service from client application

17 Adding Web Reference Right click the root of the Web Site Add Service Reference Enter the URL of the wanted web service followed by “?WSDL” ce.asmx?WSDL Namespace (the grader assumes this!) UserName (Web Site Name, e.g. CS3870)

18 Adding Web Reference Add Service Reference to the Web Service created on your Web site Namespace YourUserName (Web Site Name, e.g. YangQ)

19 Web Config The Web Config file will be updated automatically with the following. <endpoint address=" binding="basicHttpBinding" bindingConfiguration="UWPCSSEWebServiceSoap" contract="CS3870.UWPCSSEWebServiceSoap" name="UWPCSSEWebServiceSoap" />

Page Product.aspx Protected Sub Page_Load(... ) Handles Me.Load Dim obj As CS387.UWPCSSEWebServiceSoapClient Dim myTable As Data.DataTable = obj.WS_GetAllProducts() GridView1.DataSource = myTable GridView1.DataBind() End Sub 20

21 Selecting Web Services Dim ws As String Dim obj As Object If ws = "CS3870" Then ‘obj = New CS3870.UWPCSSEWebService obj = New CS3870.UWPCSSEWebServiceSoapClient ElseIf ws = "yangq" Then obj = New yangq.UWPCSSEWebServiceSoapClient End If Session("WS") = obj

22 Invoking Web Methods Dim obj As Object Dim myTable As Data.DataTable Protected Sub Page_Load(...) Handles Me.Load obj = Session("WS") myTable = obj.WS_GetAllProducts() Session("WS_Table") = myTable GridView1.DataSource = myTable GridView1.DataBind() End Sub

Must Select WS first On each of other pages Protected Sub Page_Load(...) Handles Me.Load If Session("WS") Is Nothing Then 'Server.Transfer("~/Prog9/Default.aspx") Response.Redirect("~/Prog9/Default.aspx") Exit Sub End If... End Sub 23

Accessing Table From Web Service No Credit if Accessing Database without Web Service 24

Session Variables Need to be Created and Updated 25

Not Working Delete and Create Service Reference? 26

AJAX All Web Pages 27

AJAX: Test 3 Page Default (displaying courses) –Two UpdatePanels –Triggers –UpdateMode: Conditional Page Credit –One UpdatePanel –Put a Panel or another container inside UpdatePanel –Add user controls inside the Panel –No Triggers 28