PDA

Click to See Complete Forum and Search --> : Consuming a WebService **SOLVED**


Sgt-Peppa
Apr 2nd, 2004, 10:21 AM
Hey all, how can I consume a Web Service from a C# class.

I already added a WebReference to the Project.
Now calling localhost..... i am able to have a look at the classes. I can find the class I need, but it has no method (function) that returns a value. what I want is something like this:

myAnswerXmlDocument = myWebservice.myFunction(mysendXmlDocument);

Am I thinking to easy? :confused:

Any quick example would be of a help, thanks, stephan

hellswraith
Apr 2nd, 2004, 08:35 PM
WebService1 myWebservice = New WebService1();

myAnswerXmlDocument = myWebservice.myFunction(mysendXmlDocument);

I think you have to create an instance of it. It has been a few months since I used them, so sorry if I am wrong...

Sgt-Peppa
Apr 8th, 2004, 03:38 AM
I think you have to create an instance of it. It has been a few months since I used them, so sorry if I am wrong...

No you are wright about that one. And I did. Sorry for not explaining exactly.

Figured it out, my Web Service function did not a return value since I was just passing a ref value. :blush:

Took me while to figure that out,

thanks

Stephan