Click here to Skip to main content
13,288,520 members (67,470 online)
Rate this:
Please Sign up or sign in to vote.
See more:

How many ways we can call webmehod in web service?
Which is the best way ?

Thanks and Regards,
Posted 9-Jan-13 2:48am
Updated 9-Jan-13 3:04am
aspnet_regiis -i 9-Jan-13 7:52am
what ?
ajay.anilmaddi 9-Jan-13 8:05am
How to call the Webservice(WebMethods)?
ryanb31 9-Jan-13 8:28am
There is no best way, that depends on what you are doing. Can you be more clear on exactly what you need?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If the web service is basic asmx web serivce,then you can use WSDL.exe tool to create client proxy class for the XML Web service and add this generated client proxy class to your project,finally you can use the web method of web service.

1,Web Services Description Language Tool (Wsdl.exe)

As suresh_g_v2002 mentioned, you can also call Web Service or WCF REST Service asynchronously using ScriptManager.

2,Consuming a WCF / ASMX / REST Service using jQuery
Consuming a WCF / ASMX / REST Service using jQuery

If the web service is ordinary WCF service,you can directly add service reference within the project explorer or use svcutil.exe to generate client proxy class.


In .Net without adding reference to the project we can call in the following ways

1. Using HttpWebRequest of System.Net namspace..,

2. We can also call webservice asynchronously using Scriptmanager.

[ Bit of googling can solve the problem ]
Marcus Kramer 9-Jan-13 9:15am
Krunal Rohit 9-Jan-13 9:17am
Thanks Marcus...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171207.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100