Results 1 to 3 of 3

Thread: Consuming a WebService **SOLVED**

  1. #1

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Consuming a WebService **SOLVED**

    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?

    Any quick example would be of a help, thanks, stephan
    Last edited by Sgt-Peppa; Apr 8th, 2004 at 03:39 AM.
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    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...

  3. #3

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    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.

    Took me while to figure that out,

    thanks

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width