Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2006

Tip: Looking for answers? Try searching our database.

Refferencing a Webservice proxy class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vi - 07 Apr 2006 15:28 GMT
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.
Mike Lewis - 07 Apr 2006 20:18 GMT
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();
       }

> Hi,
> I'd like to invoke a web service from a Windows Forms client, without
[quoted text clipped - 11 lines]
>
> Thanks.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.