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

I need a project which shows paypal integration with asp.net, I need a proj...

I need a project which shows Paypal integration with ASP.net website We have events website written in C# and ASP.net. We want to integrate Paypal using API and have a full inte

Describe the roles of clr in .net framework, Describe the roles of CLR in ....

Describe the roles of CLR in .NET Framework. CLR gives an environment to execute .NET applications on target machines. CLR is also a common runtime environment for all .NET cod

Web service based application, Web Service based application: ...

Web Service based application: Aims and Objectives Classics Online is a Web-based book and music retailer specialising in pre-1980s hardback

Gaming tracks company for a mobile game developing, Require Guys in Gaming ...

Require Guys in Gaming Tracks Company for a mobile game developing Project Description: I want a team of game developers for life-time as mobile dev team in my company. So, i

Is it good to distribute implementation to remoting client?, It's never tol...

It's never told  to distribute complete implementation at client, due to following shown  reasons:- 1) Anyone can use ILDASM and decrypt your logic. 2) It is a bad architectu

Uddi, What is UDDI? The Full form of the UDDI is Universal Description,...

What is UDDI? The Full form of the UDDI is Universal Description, Discovery and Integration. The directory that can be used to publish and discover public Web Services. If you

.net components in com, How can we use .NET components in COM .NET comp...

How can we use .NET components in COM .NET components can't be used in straight forward way with the COM. You will require to create CCW in order to communicate COM components

Printing and adding fibonacci series - c# program, Printing and adding Fibo...

Printing and adding Fibonacci series - C# Program Hello guys i need your advice. How can i print and add Fibonacci series in my project. Please recommend some examples.

Develop a new website, I need to develop a new website. Previous site was n...

I need to develop a new website. Previous site was not good and I need better one with not only static but using also more details . Skills required: .NET, MySQL, C# Programm

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