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.

Slides:



Advertisements
Similar presentations
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Advertisements

Session 6 Module 2 Calling a Web Service from an ASP.NET Web Page.
1 CS 3870/CS 5870: Lab4 Save with Invalid Price Keep Order After Updating.
Introduction to MVC Adding a View Page NTPCUG Tom Perkins, Ph.D.
XML Web Services in Visual Studio ®.NET NameTitleCompany.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 42 Web Services.
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.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
Web Services February 14 th, Outline Overview of web services Create a web service with MS.Net Requirements for project Phase II.
Web Service Project (.NET) Dr. Dante Ciolfi (chawl fee)
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
XML Web Services in Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group.
WSDL: Web Services Definition Language CS 795/895.
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.
CSCI 6962: Server-side Design and Programming Web Services.
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.
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.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
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.
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.
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.
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.
IMS 4480: Introduction to Web Services 1 Dr. Lawrence West, MIS Dept., University of Central Florida Introduction to Web Services—Topics.
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.
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.
Mark Dixon 1 22 – Object Oriented Programming. Mark Dixon 2 Questions: Databases How many primary keys? How many foreign keys? 3 2.
Working With ASP.NET Application. Create a new virtual directory The procedure to create a new virtual directory Internet Services Manager Right click.
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 14. Prog5 Due 10 PM Wednesday, Oct 21 Authentication and Authorization 2.
Hand Hygiene Improvement Program NEW DATA ENTRY SITE Updated: November, 2015 Hospital Epidemiology.
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
1 Using MVC 6. MVC vs. ASP Web Forms Both run under ASP.NET Can coexist In Web Forms, browser requests page. xxx.aspx and xxx.aspx.cs on the server Page.
1. Prog3 Try and Catch Testing 2 Catching Database Errors Protected Sub DetailsView1_ItemDeleted( sender As Object, e As DetailsViewDeletedEventArgs)
CS 3870/CS 5870 Web Service.
Web Application with Database
CS 3870/CS 5870 Web User Controls.
28 Web Services.
Session Variables and Post Back
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
4Schools Adding a Web Page.
How to Create a Simple Web Service and Use it in ASP.Net
Web Services Introduction
Offline Database Synchronization with SOAP and MySQL
CS 3870/CS 5870 Web User Controls Events (II).
CS 3870/CS 5870 Prog 6 Site Map.
CS 3870 Prog5 Shopping Bag.
CS 3870/CS 5870 Test 2 (50 points) Thursday
Setting Up Your Development Environment
Chapter 42 Web Services.
3.3 – Invoke Workflow File Exercise 3.2: Extract as Workflow
Presentation transcript:

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 XML MS.NET Remoting

3 Creating Web Service Add New Items for the web site Web Service File UWPCSSEWebService.asmx File UWPCSSEWebService.vb under App_Code

4 Web Service Namespace At the beginning of UWPCSSEWebService.vb Default Change to

5 Web Service Class _ Public Class UWPCSSEWebService Inherits System.Web.Services.WebService ‘ An example of web method _ Public Function HelloWorld() As String Return "Hello" End Function End Class

6 Looking at Web Service Go to the Web Service URL: EWebservice.asmx

7 Web Service Class _ Public Class UWPCSSEWebService Inherits System.Web.Services.WebService ‘ Create new web methods _ Public Function WS_GetAllProducts() As Data.DataTable ‘ May need to setup adapter DataClass.tblProducts.Clear()‘Should have this! ‘ Return the datatable End Function End Class

8 Web Service Class _ Public Class UWPCSSEWebService Inherits System.Web.Services.WebService ‘ Create new web methods Public Function WS_GetAllProducts() As Data.DataTable ‘ May need to setup adapter DataClass.tblProducts.Clear()‘Should have this! ‘ Return the datatable End Function End Class Will not Work!

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

10 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 UserName (Web Site Name, e.g. CS3870)

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

12 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

13 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

Session Variables Record_Index Page_Index Table 14

Accessing Table From Web Service No Credit if Still Accessing Local Table 15

Pages Default and SelectingWS Must select WS first Page Default Protected Sub Page_Load(...) Handles Me.Load If Session("WS") Is Nothing Then 'Server.Transfer("~/Lab6/SelectingWS.aspx") Response.Redirect("~/Lab6/SelectingWS.aspx") End If... End Sub 16

Not Working Delete and Create Service Reference? 17