Instructions for writing Web Services using Microsoft.NET:

Similar documents
Using the TekScope IVI-COM Driver from C#.NET

Pace University. Web Service Workshop Lab Manual

Microsoft Visual Basic 2005: Reloaded

Developing Web Applications Using Microsoft Visual Studio 2008 SP1

Porting your Dyalog Application to Internet

Tutorial: Deploying a Progress Corticon Decision Service as a Web Service for.net. Product Version: Corticon 5.6

Active Server Pages ( ASP.NET)

Microsoft Official Courseware Course Introduction to Web Development with Microsoft Visual Studio

OGSI.NET UVa Grid Computing Group. OGSI.NET Developer Tutorial

Hands-On Lab. Getting Started with Office 2010 Development. Lab version: Last updated: 2/23/2011

Menus. You ll find MenuStrip listed in the Toolbox. Drag one to your form. Where it says Type Here, type Weather. Then you ll see this:

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.

Savoy ActiveX Control User Guide

การสร างเว บเซอร ว สโดยใช Microsoft.NET

Quick Guide for the ServoWorks.NET API 2010/7/13

Activating AspxCodeGen 4.0

Risk Sharing Pool. File Transfer via Web Services Technical Guide

IBM Rational XDE Developer v net Edition

To get started with Visual Basic 2005, I recommend that you jump right in

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

How to read/write text file

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Web Services in.net (2)

Introduction to Web Development with Microsoft Visual Studio 2010

Overview Describe the structure of a Windows Forms application Introduce deployment over networks

INTRODUCTION TO VISUAL BASIC 2010

Demo: Integrating a.net-based user interface with a Java back end. Version 8.2

Developing an app using Web Services, DB2, and.net

Operating System and Microsoft Visual Studio Compatibility Matrix for RTX

Preliminary TECHNICAL DESCRIPTION. MSX-Exxxx and.net

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A)

CST242 Windows Forms with C# Page 1

COPYRIGHTED MATERIAL. Taking Web Services for a Test Drive. Chapter 1. What s a Web Service?

Lab Manual Visual Studio Team Architect Edition

Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.

"Charting the Course... MOC A Introduction to Web Development with Microsoft Visual Studio Course Summary

Introduction to Web Development with Microsoft Visual Studio 2010

CT862 Section 1 Introduction

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Q&A. DEMO Version

Additional Connectivity Options

CST272 Getting Started Page 1

Getting Started with the Bullhorn SOAP API and C#/.NET

Web Services Hans-Petter Halvorsen

Getting Started with EPiServer 4

SCRIPT REFERENCE. UBot Studio Version 4. The Browser Commands

Tutorial 03 understanding controls : buttons, text boxes

Introduction to Web Development with Microsoft Visual Studio 2010 (10267A)

Document for Consuming Web-Service In.NET & JAVA

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis

IN ACTION. Wictor Wilén SAMPLE CHAPTER MANNING

Table of contents. Pure PHP/ASP Upload AddOn Pack Manual DMXzone

Web Service Input Actions

EL-USB-RT API Guide V1.0

Visual C#.net examples

Konark - Writing a KONARK Sample Application

Skill Area 336 Explain Essential Programming Concept. Programming Language 2 (PL2)

Microsoft Content Management Server Integration with SAP

Objectives : 1) To study the typical design of a LCD module 2) To interface the digital display unit through parallel printer port using C# program.

IBSDK Quick Start Tutorial for C# 2010

M Developing Microsoft ASP.NET Web Applications Using Visual Studio.NET 5 Day Course

It is necessary to follow all of the sections below in the presented order. Skipping steps may prevent subsequent sections from working correctly.

Web Platform Introduction With a focus on free. Mike Taulty Developer & Platform Group Microsoft Ltd

Event-based Programming

10267 Introduction to Web Development with Microsoft Visual Studio 2010

Developing User Controls in EPiServer

CIS 3260 Intro. to Programming with C#

Building Web Sites Using the EPiServer Content Framework

Integration and Extension Product Version: 8.0 Quick Start Guide

Access SAP Business Functions (ABAP) via Web Services

BEAWebLogic Server. WebLogic Web Services: Advanced Programming

Visual RPG for.net Web for Smarties

Web services are a middleware, like CORBA and RMI. What makes web services unique is that the language being used is XML

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Network Variable

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Chapter. Web Applications

CST272 Getting Started Page 1

CSC 615 WEB SERVICES WEB SERVICES LAB

TRAINING GUIDE FOR OPC SYSTEMS.NET. Simple steps to successful development and deployment. Step by Step Guide

MFC One Step At A Time By: Brandon Fogerty

Step By Step Procedure to Implement Soap to JDBC Scenario

DB DAL BLL WS. Server. Click2Go Web Site. Mobile Phone. Click2Go Mobile Application. System's Architecture. System Overview

SHAREPOINT 2007 DEVELOPER S GUIDE TO

WinForms Charts How to Invoke the Chart Wizard at Runtime

My Enterprise Guide David Shannon, Amadeus Software Limited, UK

Object oriented lab /second year / review/lecturer: yasmin maki

Online Activity: Debugging and Error Handling

Security overview Setup and configuration Securing GIS Web services. Securing Web applications. Web ADF applications

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

C# THREADING AND EVENTS

Getting Started with EPiServer 4

Conventions in this tutorial

CIS 3260 Intro. to Programming with C#

Three Ways Roslyn Will Change Your Life

Hands-On Lab. Lab Manual Building Solutions with the Microsoft Office Information Bridge Framework

Using VO Windows in a.net Windows Form Application

DE-2310 Developing Web Applications Using Microsoft Visual Studio 2008 SP1

Windows 7 Control Pack for WinForms

Department of Computer Applications

Integrating With.NET. Patterns for Leveraging SAS in Microsoft's Strategic Architecture. Dan Jahn SAS

Transcription:

Instructions for writing Web Services using Microsoft.NET: Pre-requisites: Operating System: Microsoft Windows XP Professional / Microsoft Windows 2000 Professional / Microsoft Windows 2003 Server.NET Runtime: Microsoft.NET Framework 1.x or later Visual Studio: 2003 or 2005 IIS: Required if using Visual Studio.NET 2003 Instruction for Visual Studio.NET 2003 [Note: I am assuming no prior experience in working with Visual Studio.NET 2003] 1. Create a new project and select ASP.NET Web Service project template You can specify your own name for the web service. Let us say we are creating a web service called Calculator and click ok.

2. You should now see the Solution Explorer. If you do not see it, just click on View and then click on Solution Explorer. 3. Service1.asmx is our web service. The URL for such a service would be http://localhost/service1.asmx. You can rename your asmx file to the name of your choice. Let us rename it to Calculator.asmx 4. Now right click on the asmx file and select View Code.

Service1 is the class name with in the namespace Calculator. You can rename it to anything you want to. Let us rename it to Calculator. 5. Now build the project. You can now see you web service at http://localhost/calculator/calculator.asmx..net creates a nice interface which lists all the methods this service provides. At this point we do not have any methods our service provides. 6. Writing the add service. To do that need to create a new web method in the class Calculator. Web methods generally are prefixed by [WebMethod] directive. Also make sure that the method is a public method. Add the following lines to the service. [WebMethod] public int add(int a, int b) { return a + b; } Build the application. To see what methods your web service supports go back to the URL http://localhost/calculator/calculator.asmx. You will see add service listed. 7. Click on add you will see this page give some values for a and b and click on invoke. This will return the result in another page

8. WSDL. In order to see the wsdl for the current service, enter the following URL: http://localhost/calculator/calculator.asmx?wsdl. Now we have completed writing the add web service. Writing the client application in.net. 1. Create a new project and select ASP.NET web application give it some name and click OK

2. You will see a solution explorer that a WebForm1.aspx file. You can rename it to any name you want to. Let us name it as CalcTest.aspx 3. Now we will design the front end for the page we created. We shall have three text boxes and labels. Two for input and one for the out put. Add a button also. [Note: you will find these controls in the toolbox.]

4. Adding the web service as a web service to the client: Right click on references and select Add Web Reference as shown Select Web services on the local machine option. Select Calculator service that we just created as shown

On the next screen, rename the web reference name to CalculatorService and click on Add Reference Button as shown

Now you can see the calculator service with in CalculatorService in your application. Also you can see in WebReference with in your Solution Explorer. You can see the client side stub for the web service by Right clicking on the service and selecting View in Object Browser option. This is called as a proxy class. 5. Using the Web service. Now we will add event handler for the button click event for calculate button. To do that just double-click on the button. The action would take you directly to the even handler function. Just add the following code to the event handler. private void Button1_Click(object sender, System.EventArgs e) { CalculatorService.Calculator calcservice = new CalculatorService.Calculator(); int param1 = Convert.ToInt32(TextBox1.Text); int param2 = Convert.ToInt32(TextBox2.Text); int result = calcservice.add(param1, param2); TextBox3.Text = Convert.ToString(result); } 6. Now run the application and you can test the service we just wrote.