473,657 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call web service from a http post

I understand how to consume a web service by registering it as a web
reference in my project, but how to use HTTP Post to call a web service? For
example I have a web service called TestService, and have a WebMethod called
TestMethod, it has a string type parameter A, anybody can explain a little
bit on how to call it from http post?

Thanks!

Jason

Dec 19 '06 #1
3 12588
I am pretty new to wenservices my self. But I think the following should give
you a good idea.

You have added the webservice as a reference to your project. The reference
is called Proxy.

Proxy test = new Proxy();
test.Credential s ... use this code if u have authentication
object[] test2 = test.WebMethodN ame(parameters) ;

This is pretty basic and assumes you have consumed a webservice. Hope this
helps.

"Jason Zhou" wrote:
I understand how to consume a web service by registering it as a web
reference in my project, but how to use HTTP Post to call a web service? For
example I have a web service called TestService, and have a WebMethod called
TestMethod, it has a string type parameter A, anybody can explain a little
bit on how to call it from http post?

Thanks!

Jason

Dec 28 '06 #2
I understand how to consume a web service by registering it as a web
reference in my project, but how to use HTTP Post to call a web service? For
example I have a web service called TestService, and have a WebMethod called
TestMethod, it has a string type parameter A, anybody can explain a little
bit on how to call it from http post?

Thanks!

Jason

hi,

i also face same kind of problem. if you know anything relevant to http post and http get, can you share with me.

thanks
lakshmi
BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Jan 18 '07 #3
The WebClient class provides the ability to read/write to URLs. Maybe that
will work for you.

http://msdn2.microsoft.com/en-us/lib...webclient.aspx

"subbulaksh mi" wrote:
>
I understand how to consume a web service by registering it as a web
reference in my project, but how to use HTTP Post to call a web service? For
example I have a web service called TestService, and have a WebMethod called
TestMethod, it has a string type parameter A, anybody can explain a little
bit on how to call it from http post?

Thanks!

Jason

hi,

i also face same kind of problem. if you know anything relevant to http post and http get, can you share with me.

thanks
lakshmi
BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Feb 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3252
by: Paul Hasell | last post by:
Hi, I'm trying to invoke a web method asynchronously but just can't seem to get it to tell me when it has finished! Below is the code I am (currently) using: private void btnUpload_Click(object sender, System.EventArgs e) { try { SOPWebService.Client uploader = new
1
1916
by: A.M-SG | last post by:
Hi, I have a web service with two soap extensions enabled on it. When I run the default IIS method invoke page, the invoke button bypasses all my soap extensions. But when I call the web method through another
1
2714
by: hharry | last post by:
Hi All, I have asimple web service: <WebMethod()> _ Public Function ReSample(ByVal sInput As Integer) As String
2
1612
by: ilyas | last post by:
Hi all I have a web service that I have written. It is written in C# I want to use this web service from a browser, but my users all have different browsers so its important that the code to access the web service works across IE, Firefox and other browsers Does anybody know if they are libraries out there that do this?
0
1771
by: Werner Willemsens | last post by:
Hi, I have the following situation. COM server exposed on Windows CE 5.0 through SOAP (SOAP toolkit) C# client on XP calls Web Service methods on CE (COM)SOAP server. The complete call takes 527msec. Why is it so much? The SOAP method call is very simple : a COM method with 1 argument (long) The Ethereal logging shows that the CE server side responsiveness is good, but the XP C# client waits a very long time before he gives an ack on...
3
5966
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi, I have a winform client which consumes a WCF service. I have a single service client(proxy) at the winform side, but spread the service calls into multiple threads so that they can do works concurrently. My confusion is, as all threads share the same proxy, will one thread block another while calling a long running service? Is this related to the service concurrent configuration? Thanks.
3
4416
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
2
5556
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the serialization settings for the build handled the initial slows we encountered when invoking the web service. Since that time, we ported the original VB.net code over to C# - this was done to make it cleaner easier to include the project in the rest of...
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.