ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.

Slides:



Advertisements
Similar presentations
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Advertisements

Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
XML Web Services in Visual Studio ®.NET NameTitleCompany.
ASP.Net, web services--- asynchronous and synchronous and AJAX By Thakur Rashmi Singh.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Introduction to Web Services
Windows Communication Foundation and Web Services.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 42 Web Services.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
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.
Chapter 12 Extending Web Applications. ASP.NET 2.0, Third Edition2.
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.
Current Popular IT I Pertemuan 7 Matakuliah: T0403/Current Popular IT I Tahun: 2008.
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.
What are Xml Web Services? 1.A Web Service simply an application that exposes a Web- accessible API. 2.Web services are a new, standard platform for building.
Web Service Implementation Maitreya, Kishore, Jeff.
TP2653 Adv Web Programming SOAP and WSDL. SOAP Simple Object Access Protocol – Lightweight XML-based messaging protocol – A protocol for accessing a Web.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
February 24 th -25 th 2004 Daragh Byrne – EPCC Additional.NET Concepts.
Chapter 9 Web Services Architecture and XML. Objectives By study in the chapter, you will be able to: Describe what is the goal of the Web services architecture.
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.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
1 HRS2422 Web Services JAX-WS and SOAP Introduction  Web service – A software component stored on one computer that can be accessed via method.
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.
Web Services An introduction for eWiSACWIS May 2008.
CSCI 6962: Server-side Design and Programming Web Services.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
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 Fundamentals ASP.NET Web Services December 11, 2003.
.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.
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.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Chapter 10 Intro to SOAP and WSDL. Objectives By study in the chapter, you will be able to: Describe what is SOAP Exam the rules for creating a SOAP document.
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.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
Kemal Baykal Rasim Ismayilov
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
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.
Chapter 7: Creating and Consuming XML Web Services Understanding XML Web Services Creating XML Web Services Deploying and Discovering XML Web Services.
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.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
ODS – Introduction to Web Services and BPEL Vakgroep Informatietechnologie Web Services & BPEL Design of Distributed Software.
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.
.NET Mobile Application Development XML Web Services.
SOAP, Web Service, WSDL Week 14 Web site:
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
Windows Communication Foundation and Web Services
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Creating,Publishing,Testing and Describing a Web Service
WEB SERVICES.
Windows Communication Foundation and Web Services
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 Server Administration
The future of distributed systems architecture
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Quiz Points 4 Rules Raise your hand if you know the question
Deepak Shenoy Agni Software
Chapter 42 Web Services.
A Little Bit of Active Server Pages (ASP)
Presentation transcript:

ASP.NET Web Services

 A unit of managed code installed under IIS that can be remotely invoked using HTTP.

Similar Technologies  DCOM  CORBA  EJB (Enterprise Java Beans)  All are tied to a specific language or a proprietary protocol.

Introducing Web Services  Language Agnostic.  Can be called by any program that can parse XML and use HTTP.  Can be called from Web Forms as well as Windows Forms.

Supporting Technologies  Web Service Description Language (WSDL)  A wire protocol (HTTP GET, HTTP POST, or SOAP)  A discovery Service (*.disco files)  Proxies  IIS

Building a Simple Web Service  Select C# Projects->ASP.NET Web Service.  Automatically creates a virtual directory under IIS.  Can test from within the program without using a client.

[WebMethod] Attribute  This attribute must be applied to each method you wish to expose to the outside world through HTTP.  May have optional parameters such as: –Description –EnableSessionn (false by default) –MessageName  Adds a description to the WSDL Contract. [WebMethod(Description=“Returns an integer between 0 and the parameter”)] public int ReturnAnInt (int MaxValue) { return new Random().Next(MaxValue); }

WebService Base Class  Not required to derive from this class, can inherit directly from object.  Adds functionality such that a web service can interact with the same types used by the ASP.NET object model: –Application Object –Context Object –Server Object –Session Object –User Object

WSDL  Web Service Description Language  Contract between the client and the web service, that defines the interaction –Function names. –Parameters and their types. –Syntax of various wire protocols.  System.Web.Services.Description contains types that allow you to programmatically manipulate the WSDL.

SOAP  Simple Object Access Protocol  XML Based  Types –ADO.NET DataSets –Complex Arrays –Custom Types  Binding: </binding>

Proxies  Creates a class that contains the interface for your web service  Using wsdl.exe C:\wsdl.exe out:c:\testproxy.cs  Using Visual Studio.NET –Add Web Reference

Proxies  Adds Asynchronous and Synchronous versions of each exposed Web Method  Looks and feels like the Web Service is a class in the client application

Advanced  Serializing Custom Types  Using Session to maintain information from previous calls  Connecting to a Database

Serializing Custom Types using System; using System.Xml.Serialization; namespace CarsWebService { //Tells the serializer to generate the proper XML tags for a car type //Tells the serializer to generate the proper XML tags for a car type [XmlInclude(typeof(Car))] [XmlInclude(typeof(Car))] public class Car public class Car { public string name; public string name; public int maxSpeed; public int maxSpeed; public Car(){} public Car(){} public Car(string n, int s) public Car(string n, int s) { name = n; name = n; maxSpeed = s; maxSpeed = s; } }} //The XML Serializer will only serialize public members or properties that expose those members

Session State namespace TestService { public class TestService1 : System.Web.WebService { public TestService1() {InitializeComponent(); Session.Add(“TestDataSet”, null); }[WebMethod] public void TestMethod(DataSet ds) { Session[“TestDataSet”] = ds; }}}

Database Connections  Allows for Database client software to reside on one machine.  Allows for one consistent interface to the database.  Allows the business rules to be separate from the client

Discovery Service Protocol  Describes each Web Service in a given virtual directory. .disco file is part of the client project  C:\disco  C:\disco <discovery xmlns:xsd=" xmlns:xsi=" xmlns=" <contractRef ref=" docRef=" xmlns=" /> <soap address=" xmlns:q1="hpsiserver.hpsionline.com" binding="q1:BuildRunServiceSoap" xmlns=" />

Distributing over a network Database Web Service Web Form Windows Form

Creating a Web Service Project  Choose ASP.NET Web Service  The project is created in C:\Inetpub\wwwroot\projectname  The web service file is.asmx –Code behind is in.asmx.cs file  IIS must be installed

Using a Web Service  Add a web reference –The proxy is hidden in the Web Reference  Create an instance of the proxy class  Use the proxy instance as you would a normal class instance

Conclusion  Web Services are cool!  Can be used to allow dissimilar systems to communicate  Easy to implement  Easy to learn how to use  Fairly Slow