473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Refferencing a Webservice proxy class

Vi
Hi,
I'd like to invoke a web service from a Windows Forms client, without
creating a web reference to the web service in the client project (VS.NET
2005).

I created the proxy class using wsdl.exe, added it to the client project and
I'm not sure what to do next in order to reference/invoke the web serivice.

I read somewhere that it's possible, but all the examples I found are using
web references.

Thanks.
Apr 7 '06 #1
1 1260
If you have the C# file in the project, you are done. Just reference the
class name in your code. I created a web service called MathClass which had
a method called AddInts. In the windows form code, I just referenced the
class (MathClass.cs file created by wsdl).

....
MathClass myMathClass;
int myResult, v1, v2;

public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
myMathClass = new MathClass();
v1 = Int32.Parse( textBox2.Text );
v2 = Int32.Parse( textBox3.Text );
myResult = myMathClass.AddInts( v1, v2 );

textBox1.Text = myResult.ToString();
}

"Vi" <Vi@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
Hi,
I'd like to invoke a web service from a Windows Forms client, without
creating a web reference to the web service in the client project (VS.NET
2005).

I created the proxy class using wsdl.exe, added it to the client project
and
I'm not sure what to do next in order to reference/invoke the web
serivice.

I read somewhere that it's possible, but all the examples I found are
using
web references.

Thanks.

Apr 7 '06 #2

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

Similar topics

1
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
5
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices...
6
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a...
4
by: Flare | last post by:
OK. I'll try explain my problem so simple as possible. I have to send a complex data type to a WebService from a Asp.net webapplication. My Data type look like this. (A class with a porperty)...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i don´t want to filter the return value of the method, i have to pass a new instance of the...
4
by: MacLanca | last post by:
Hi, I've done the HelloWorld WebService, installed in a WebServer (INTERNET) When I call it with Windows App it works, if I use a webform it doesn’t (INTERNET) Both of them work in the INTRANET...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
2
by: Techno_Dex | last post by:
I have a custom object that I have written which is serializable. I have put this object in it's own dll which is referenced by both the WebService and the Application using it. My problem is the...
3
by: Mark | last post by:
I'm consuming a webservice that makes a simple object available. The object class is marked in the web service as . I have a web application that consumes and uses this web service's class. When...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.