Steps to create a webservice, DOT NET Programming

Assignment Help:

What are the steps to create a webservice?

This webservice will add 2 numbers and send  to the calling client.All the below steps shown are according to VS2005 beta editor :-

1) At First create a website by clicking on File -- New WebSite.

2) By the "Visual Studio Installed Templates" click on the "Asp.NET Web Service". Now Name the figure as "Maths Web Service".

2033_webservice project.png

Figure:-Create WebService Project

3) By default the .NET editor has made a default webservice method known  as "HelloWord" that returns a string datatype. Let's rename "Service.vb" to "Maths.vb" & "Service.asmx" to "Maths.asmx". Let's replace the "HelloWorld" with the following code shown below:-

_

Public Function AddTwoNumbers(ByVal Number1 As Integer, ByVal

Number2 As Integer) As Integer

Return Number1 + Number2

End Function

707_webservice project1.png

Figure: - Rename all your default "Service" to "Maths"

4) After the webservice is completed  click on add Webreference. Generally for components we do a "Add Reference" and for Webservices we do "Add Web Reference".

1295_webservice project2.png

Figure:-Click on Add Web Reference

5) You will be shown with a list of webservices that are known to the solutions. As we are looking for our "Maths" webservice that exist in the similar solution, we click "Webservices in this solution".

370_webservice project3.png

Figure: - List of webservices for browsing

6) Now your editor has located the "Maths" webservice.Now Select the webservice

505_webservice project4.png

Figure: - Solution shows the availability of Maths Webservice.

7)After you have clicked on "Maths" webservice you will see a search progress bar as shown. This process will start up the webservice, reference it and create a proxy for the client, so by using it client can absorb the webservice.

562_webservice project5.png

Figure: - Starting the webservice and creating the proxy for your solution

8)Finally you are able to get your webservice which is ready for use. Now Click on Add Reference and you will see a "Localhost" reference in your .NET solution.

782_webservice project6.png

Figure: - Starting the webservice and creating the proxy for your solution.

9) We need to make a client who will absorb the "Maths Webservice". Now Add "WebserviceClient.aspx" and create a UI as shown . In the button click put it in the following code. "LocalHost.The ClsMaths" is the proxy object by which you can make calls to the webservice.

Sub cmdCalculate_Click(ByVal sender As Object, ByVal e As

System.EventArgs)

Dim pobjMaths As New localhost.ClsMaths lblResultDisplay.Text =

Convert.ToString(pobjMaths.AddTwoNumbers(Convert.ToInt16(txtNumber1.Text), Convert.ToInt16(txtNumber2.Text)))

End Sub

681_webservice project7.png


Related Discussions:- Steps to create a webservice

C# coding to include user specified screen recording to app, C# coding to i...

C# coding to include user specified screen recording to app Project Description: Reposting as selected coder didn't read brief and accepted job to do then tell me would be in

Characteristics of object oriented system''s, What are characteristic's of ...

What are characteristic's of Object Oriented System's? The characteristics of Object Oriented System's are as follows: 1)    Abstraction: The Abstraction allows the comple

State the advantages of xml schemas over dtd, State the advantages of XML s...

State the advantages of XML schemas over DTD. Microsoft developed a language called as the XML Schema Definition (XSD) to explain the schema to an XML document. The following a

Tfs - spirateam synchronization plugin, TFS - SpiraTeam synchronization plu...

TFS - SpiraTeam synchronization plugin. Project Description: We would like you to develop the subsequent requirements in one plug-in already in production. The plug-in was de

Sequence diagrams, Describe the various components in sequence diagrams. ...

Describe the various components in sequence diagrams. Object lifeline: - It shows the lifetime of an object creation and its destruction. If the object is created or des

Simple task on analysis svn and github, Project Description: Simple task...

Project Description: Simple task on analysis svn and github .NET, PHP, Engineering, Software Architecture

Basic use of "dataview", What is basic use of "DataView"? The "DataView...

What is basic use of "DataView"? The "DataView" represents the whole table or can be small parts of rows depending on some criteria. It is the best used for sorting and finding

What is the role of the jit compiler in .net framework, What is the role of...

What is the role of the JIT compiler in .NET Framework? The JIT compiler is an significant element of CLR, which loads MSIL on target machines for execution. The MSIL is stored

Vb.net and livecycle form, We have a VB.NET application to organize the edi...

We have a VB.NET application to organize the edition and creation of dynamic PDF forms (fishing trip logsheet). The fishing vessel parameters are entered once for good in this VB.N

Explain the concept of destructor, Explain the concept of destructor? A...

Explain the concept of destructor? A destructor is a special method for a class and is requested automatically when an object is finally destroyed. The name of the destructor i

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd