473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

when to use Proxy object for web services

I am new to web services.

I created a very simple web service with a method that returns a simple
string object. I added a web reference to this web service from another
project and I could successfully call the method.

Now, I want to understand why many suggests to create a proxy object of the
web service and then call the method using this proxy object. What is the
difference between creating a proxy object using WSDL utility and referencing
to the web service using web reference from Visual studio.net.

What condition will necessitate me for creating a proxy object exclusively
by using WSDL utility.

Thanks
Pradeep_TP
Nov 23 '05 #1
2 4575
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
Nov 23 '05 #2
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

"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

Nov 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bob | last post by:
I don't know if this is doable but sure very helpful. Is there a way to make the XML comments or the Description attribute on the on the WS to show up in the proxy class generated by VS.NET. ...
0
by: Paul Hastings | last post by:
Hi All - I am trying to build a Web Service that can be accessed using an Excel spreadsheet. I have been able to do this for relatively simple access to the Web Service. But now I need to...
1
by: SrDhUS | last post by:
I get the following error when I try to add a web reference using Web Reference Dialog (VS .Net 2003) Error "The proxy settings on this computer are not configured correctly for web discovery."...
0
by: Peter Theill | last post by:
I have these two web services: namespace WebService1 { public class Service1 : System.Web.Services.WebService { public Service1() { } public string HelloWorld() {
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
0
by: hazz | last post by:
After generating an XML Web Service proxy class using wsdl.exe, I added a proxy class to a new VS2005 project to consume my webservice. I want to call the method ReturnCustomer() whose proxy...
1
by: louis_la_brocante | last post by:
Dear all, I am having trouble generating a client proxy for a webservice whose methods return a "complex" type. The type is complex in that it is a class whose members are a mix of primitive...
3
by: Arpan | last post by:
Web Services make use of proxy classes whose methods & properties are accessed in exactly the same way as how a normal class' methods & properties are accessed. So what for does ASP.NET generate...
2
by: Peter | last post by:
Firstly let me be very clear about this, I do not want to create a web service proxy nor do I want to do anything with web services. Basically, I have a shrink wrapped desktop application which...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.