hi michael,
The reason why I asked this question was, I created a web service with a
property get and set. I am able to set the value to the property but when I
am retrieving, then I am getting "Object reference error". On reading
articles, I found that since web services are stateless they will not retain
the value and there for proxy object should be used. so now I am wondering,
if VS IDE is creating a proxy object automatically, then why is it not able
to retain the value of property. Following is the code that i have written
for property
string _property;
public string HelloWorldProperty
{
[WebMethod(EnableSession=true)]
get
{
return _property;
}
[WebMethod(EnableSession=true)]
set
{
_property = value;
}
}
thanks
Pradeep_TP
[quoted text, click to view] "Michael Nemtsev" wrote:
> Hello pradeep_TP,
>
> It's the same stuff, VS IDE calls wsde.exe and generate proxy automatically
>
> p> I am new to web services.
> p>
> p> I created a very simple web service with a method that returns a
> p> simple string object. I added a web reference to this web service
> p> from another project and I could successfully call the method.
> p>
> p> Now, I want to understand why many suggests to create a proxy object
> p> of the web service and then call the method using this proxy object.
> p> What is the difference between creating a proxy object using WSDL
> p> utility and referencing to the web service using web reference from
> p> Visual studio.net.
> p>
> p> What condition will necessitate me for creating a proxy object
> p> exclusively by using WSDL utility.
> p>
> p> Thanks
> p> Pradeep_TP
> ---
> WBR,
> Michael Nemtsev :: blog:
http://spaces.msn.com/members/laflour >
> "At times one remains faithful to a cause only because its opponents do not
> cease to be insipid." (c) Friedrich Nietzsche
>
>