1 Web Services I: Returning Data in XML Format. 2 Service-Oriented Architecture (SOA) Old Model for Applications Executables running on individual computers.

Slides:



Advertisements
Similar presentations
Intesar G Ali IT DepartmentPalestinian Land Authority Web services Prepared by: Intesar Ali IT Department PLA August 2010.
Advertisements

XHTML Basics.
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
ASP.Net, web services--- asynchronous and synchronous and AJAX By Thakur Rashmi Singh.
Introduction to Web Services
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Web server (serves web pages).NET Framework (executes code) ASP.NET processor Internet Information Services Server HTTP requestASP.NET code OutputHTML.
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
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.
Ch 12 Distributed Systems Architectures
ASP.NET Programming with C# and SQL Server First Edition
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Creating web service (and client application) with Visual Studio 2008 Create web service project New project->web->ASP.NET web service application (with.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
IT Infrastructures and Emerging Technologies
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Membership in ASP.Net...if only Presented by: Patrick Hynds President, CriticalSites Microsoft Regional Director.
JavaScript & jQuery the missing manual Chapter 11
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
ISYS 512 Business Application Design and Development with.Net David Chao.
Introduction to Silverlight. Slide 2 What is Silverlight? It’s part of a Microsoft Web platform called Rich Internet Applications (RIA) There is a service.
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.
 What is an operating system? What is an operating system?  Where does the OS fit in? Where does the OS fit in?  Services provided by an OS Services.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
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.
Internet Technologies and Web Application Web Services With ASP.NET Tutorial: Introduction to.
© Chinese University, CSE Dept. Distributed Systems / Simple Example Open Microsoft Visual Studio 2005:
ASP.NET &.NET Environment. Overview Part of Microsoft’s.NET environment Used for Development of  Websites  Internet applications  Web Services & XML.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Introduction to MVC Introduction NTPCUG Tom Perkins, Ph.D.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
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.
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.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
Database Connectivity with ASP.NET. 2 Introduction Web pages commonly used to: –Gather information stored on a Web server database Most server-side scripting.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
Java Trends Harshad Oak - Pune Java Meet, 20 th Nov 2005.
11 jQuery Web Service Client. 22 Objectives You will be able to Use JSON (JavaScript Object Notation) for communcations between browser and server methods.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
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.
Chapter 2 Creating Website with Web Forms. Objectives Understand the different project types and templates when building ASP.NET web sites. The different.
Digital Game Design ACST 3710 Your First Unity Program 1.
ASP.NET Programming with C# and SQL Server First Edition
CS 3870/CS 5870 Web Service.
© 2016, Mike Murach & Associates, Inc.
How to Create a Simple Web Service and Use it in ASP.Net
INFO 344 Web Tools And Development
Module 1: Getting Started
Quick Start Guide for Visual Studio 2010
Web Development in Microsoft Visual Studio 2013
Consuming Webservice in AX 2012
ASP.NET Module Subtitle.
Social Media And Global Computing Creating DLLs with Visual Studio
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Intro to PHP.
Presentation transcript:

1 Web Services I: Returning Data in XML Format

2 Service-Oriented Architecture (SOA) Old Model for Applications Executables running on individual computers Limited or no ability to communicate between applications Very dependent on platform, OS and/or programming language SOA Loosely coupled “Services” Currently – Web Services Can be called from multiple platforms, OS’s and languages

3 RIA Architecture

4 Web Service A class with methods that can be accessed (via the Internet): From different platforms (Hardware and OS) By different programming languages Information is returned from the Web Service in an XML format or JSON format

5 I. Creating a "Hello World" Web Service with VS Within a Visual Studio 2010 Website 2. Website, Add New Item, Web Service This will create a class with all of the unique web service stuff already in it – including a “Hello World” test method. The web service by default will have two files (just like our web pages):.asmx file (WebService.asmx) This is what you point the users of the service at It contains a link to the.cs file (below).cs class file (WebService.cs) Lives in the App_Code folder 3. Browse.asxm file to test the Web Service

6 "Hello World" part 2 Here is the code in the WebService.asmx file This is the file that is browsed, It is essentially just a front-end to the.cs file behind it.

7 "Hello World" part 3 Here is the code in the WebService.cs file [ WebService(Namespace = " [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the //following line. // [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WebService () { public WebService () { //Uncomment the following line if using designed components //Uncomment the following line if using designed components //InitializeComponent(); //InitializeComponent(); } [WebMethod] [WebMethod] public string HelloWorld() { public string HelloWorld() { return "Hello World"; return "Hello World"; }} [ WebService(Namespace = " [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the //following line. // [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WebService () { public WebService () { //Uncomment the following line if using designed components //Uncomment the following line if using designed components //InitializeComponent(); //InitializeComponent(); } [WebMethod] [WebMethod] public string HelloWorld() { public string HelloWorld() { return "Hello World"; return "Hello World"; }}

8 I. Providing a Web Service cont: Adding Methods 1. Adding a method to a Web Service is identical to what you’re used to, except: 1. [WebMethod] attribute must be immediately before the public keyword in the method declaration [WebMethod] public decimal CalculateYearlyBonus(decimal parYearlySales) { … } [WebMethod] public decimal CalculateYearlyBonus(decimal parYearlySales) { … }

9 WS_MusicCategories [ WebService(Namespace = " [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET //AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WS_MusicCategories () { public WS_MusicCategories () { //Uncomment the following line if using designed components //Uncomment the following line if using designed components //InitializeComponent(); //InitializeComponent(); } [WebMethod] [WebMethod] public List GetCategories() { public List GetCategories() { DA_MusicCategories categoriesObject = new DA_MusicCategories(); return categoriesObject.GetCategories()"; }} [ WebService(Namespace = " [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET //AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class WebService : System.Web.Services.WebService { public WS_MusicCategories () { public WS_MusicCategories () { //Uncomment the following line if using designed components //Uncomment the following line if using designed components //InitializeComponent(); //InitializeComponent(); } [WebMethod] [WebMethod] public List GetCategories() { public List GetCategories() { DA_MusicCategories categoriesObject = new DA_MusicCategories(); return categoriesObject.GetCategories()"; }}

10 WS_MusicCategories cont. From the preceding slide, note the following: From the preceding slide, note the following: 1. The [ScriptService] line is uncommented 2. All the GetCategories web service method does is: 1. Create an instance of your DA_MusicCategories class 2. Calls the DA class method GetCategories 3. Returns the result of that call 3. The Web Service is just a wrapper around your original DA class that allows it to be used as a web service.