473,654 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4581
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 HelloWorldPrope rty
{
[WebMethod(Enabl eSession=true)]
get
{
return _property;
}
[WebMethod(Enabl eSession=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
1646
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. E.g. /// <summary>My test web service.</summary> /// <param name="someValue">blah blah</param> /// <returns></returns> public string Hello(string someValue) { ......................
0
4823
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 add authentication using a client certificate and that is where I am stuck.
1
2166
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." MSDN says: "The proxy settings on this computer are not configured correctly for Web discovery.
0
1535
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
3208
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. What it does is to call a webservice with two parameters, one being a integer, the other one being a "String" which contains XML (not the best practice, however that is the target interface and we cannot change that).
0
1140
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 details are below and assign the array of the object the return value of the function Service s = new Service(); Customer = s.ReturnCustomer; or object = s.ReturnCustomer(); The designtime debugger throws an error for s.ReturnCustomer() saying " No...
1
2857
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 types and of more elaborate classes implementing IXmlSerializable. The resulting WSDL file for the webservice has two separate schemas in its <types> sections, and the client proxy (generated with wsdl.exe) is missing the definitions of the...
3
5392
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 proxy classes (using WSDL) which consume more hard disk space & resources? For e.g. consider the following code which exists in a user-defined class file: Imports System Imports System.Data
2
2512
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 downloads data from a web site. Unfortunately the application has a fixed timeout and the web server regularly exceeds this, causing the application to shut the connection and subsequently not receive any data. The desktop application also uploads...
0
8376
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8708
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7307
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1596
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.