webservices: simple question, accessing webservice members
From: hellrazor (jorge_at_another-world.com)
Date: 11/16/04
- Next message: Dan Rogers: "RE: Timeout?"
- Previous message: Dan Rogers: "RE: Setting SMTP on a Production Machine"
- Next in thread: Dan Rogers: "RE: webservices: simple question, accessing webservice members"
- Reply: Dan Rogers: "RE: webservices: simple question, accessing webservice members"
- Reply: Hayato Iriumi: "Re: webservices: simple question, accessing webservice members"
- Reply: Nick Malik: "Re: webservices: simple question, accessing webservice members"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Nov 2004 17:01:25 -0800
Hi, (new to webservices here)
Is it possible to access a class instance variable defined in a webservice?
I want to access this variable, in addition to the data being returned by
the [webmethod].
so let's say I have the following webservice class:
public class Service1 : System.Web.Services.WebService
{
public string hello2;
public ModelServices()
{
InitializeComponent();
}
[WebMethod]
public string sayHello()
{
hello2 = "another hello to you!"
return "hello there";
}
}
...............................
So when I consume this webservice, I want to be able to call the sayHello()
method, and have access to the hello2 variable after having called sayHello
() and thus expecting the "hello2" variable to contain the "another hello
to you!" value:
remoteWS.Service1 ws = new remoteWS.Service1();
string hello1 = ws.sayHello();
string hello2 = ws.hello2;
Is this possible, and how do I go about doing it? thanks!
- Next message: Dan Rogers: "RE: Timeout?"
- Previous message: Dan Rogers: "RE: Setting SMTP on a Production Machine"
- Next in thread: Dan Rogers: "RE: webservices: simple question, accessing webservice members"
- Reply: Dan Rogers: "RE: webservices: simple question, accessing webservice members"
- Reply: Hayato Iriumi: "Re: webservices: simple question, accessing webservice members"
- Reply: Nick Malik: "Re: webservices: simple question, accessing webservice members"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|