473,748 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Implementing Interface in the Proxy Class

I have a webservice and I add a web reference from my web project.

I want the proxy class to implements an Interface, but I didn't find the
source code of the proxy class and I don't want to create a Wrapper for the
proxy.

Where is the source code? What can I do?
--
Henry Sequeira
Costa Rica
Nov 23 '05 #1
5 2566
Hi,

use the magic button in Visual Studio (Show all files).
This will allow you to expand your webreference and see the generated
proxy code and types.

I do however want to stress that "modifying generated code" is just
not a smart thing to do. Next generation... your code is history!

My advise would be to:

- Derive from the proxy
- Add Interface inheritance to the newly derived class.

Hope this helps,

Marvin Smit.

On Wed, 14 Sep 2005 09:08:04 -0700, "HenrySeque "
<He********@dis cussions.micros oft.com> wrote:
I have a webservice and I add a web reference from my web project.

I want the proxy class to implements an Interface, but I didn't find the
source code of the proxy class and I don't want to create a Wrapper for the
proxy.

Where is the source code? What can I do?


Nov 23 '05 #2
Thanks Marvin.

I forgot to say that I´m working with VS.NET 2005. For some reason the proxy
class is hidden or does not exists.

I'm still looking for.

Thanks for your advice.

--
Henry Sequeira
Costa Rica
"Marvin Smit" wrote:
Hi,

use the magic button in Visual Studio (Show all files).
This will allow you to expand your webreference and see the generated
proxy code and types.

I do however want to stress that "modifying generated code" is just
not a smart thing to do. Next generation... your code is history!

My advise would be to:

- Derive from the proxy
- Add Interface inheritance to the newly derived class.

Hope this helps,

Marvin Smit.

On Wed, 14 Sep 2005 09:08:04 -0700, "HenrySeque "
<He********@dis cussions.micros oft.com> wrote:
I have a webservice and I add a web reference from my web project.

I want the proxy class to implements an Interface, but I didn't find the
source code of the proxy class and I don't want to create a Wrapper for the
proxy.

Where is the source code? What can I do?


Nov 23 '05 #3
The easyest way to see the generated proxy class (as far as I know) is:
write some code in Visual Studio 2005 using the proxy class and then right
click on the proxy class's name and then "Go To Definition".

Best Regards,
Petru

"HenrySeque " wrote:
Thanks Marvin.

I forgot to say that I´m working with VS.NET 2005. For some reason the proxy
class is hidden or does not exists.

I'm still looking for.

Thanks for your advice.

--
Henry Sequeira
Costa Rica
"Marvin Smit" wrote:
Hi,

use the magic button in Visual Studio (Show all files).
This will allow you to expand your webreference and see the generated
proxy code and types.

I do however want to stress that "modifying generated code" is just
not a smart thing to do. Next generation... your code is history!

My advise would be to:

- Derive from the proxy
- Add Interface inheritance to the newly derived class.

Hope this helps,

Marvin Smit.

On Wed, 14 Sep 2005 09:08:04 -0700, "HenrySeque "
<He********@dis cussions.micros oft.com> wrote:
I have a webservice and I add a web reference from my web project.

I want the proxy class to implements an Interface, but I didn't find the
source code of the proxy class and I don't want to create a Wrapper for the
proxy.

Where is the source code? What can I do?


Nov 23 '05 #4
Thanks Petru.

I found the source code (with your technique), but is not posible to change
the source code, is read only and is hidden, I think VS2005 could change it
without warning me.

So, my other option is to use de wsdl.exe tool, I'll generate the proxy and
then I work directly with the proxy class.

I'll try this approach, if some of you have a better idea, please share it
with us.
--
Henry Sequeira
Costa Rica
"cPetru" wrote:
The easyest way to see the generated proxy class (as far as I know) is:
write some code in Visual Studio 2005 using the proxy class and then right
click on the proxy class's name and then "Go To Definition".

Best Regards,
Petru

"HenrySeque " wrote:
Thanks Marvin.

I forgot to say that I´m working with VS.NET 2005. For some reason the proxy
class is hidden or does not exists.

I'm still looking for.

Thanks for your advice.

--
Henry Sequeira
Costa Rica
"Marvin Smit" wrote:
Hi,

use the magic button in Visual Studio (Show all files).
This will allow you to expand your webreference and see the generated
proxy code and types.

I do however want to stress that "modifying generated code" is just
not a smart thing to do. Next generation... your code is history!

My advise would be to:

- Derive from the proxy
- Add Interface inheritance to the newly derived class.

Hope this helps,

Marvin Smit.

On Wed, 14 Sep 2005 09:08:04 -0700, "HenrySeque "
<He********@dis cussions.micros oft.com> wrote:

>I have a webservice and I add a web reference from my web project.
>
>I want the proxy class to implements an Interface, but I didn't find the
>source code of the proxy class and I don't want to create a Wrapper for the
>proxy.
>
>Where is the source code? What can I do?

Nov 23 '05 #5
Hi Henry,

Another solution is to create a derived class that inherits form your proxy
class, and implements the interface. I assume that you already have the
mothods that you want to expose via the interface, so you will have an empty
derived class. EX:
If your webservice class is MyWebservice and your interface is
IMyWebInterface then you will hava a class

public class MyDerivedWebSer viceWithInterfa ce : MyWebservice,
IMyWebInterface {
}

That is all.

Best Regards,

Tiberiu Covaci

"HenrySeque " <He********@dis cussions.micros oft.com> wrote in message
news:BB******** *************** ***********@mic rosoft.com...
Thanks Petru.

I found the source code (with your technique), but is not posible to
change
the source code, is read only and is hidden, I think VS2005 could change
it
without warning me.

So, my other option is to use de wsdl.exe tool, I'll generate the proxy
and
then I work directly with the proxy class.

I'll try this approach, if some of you have a better idea, please share it
with us.
--
Henry Sequeira
Costa Rica
"cPetru" wrote:
The easyest way to see the generated proxy class (as far as I know) is:
write some code in Visual Studio 2005 using the proxy class and then
right
click on the proxy class's name and then "Go To Definition".

Best Regards,
Petru

"HenrySeque " wrote:
> Thanks Marvin.
>
> I forgot to say that I´m working with VS.NET 2005. For some reason the
> proxy
> class is hidden or does not exists.
>
> I'm still looking for.
>
> Thanks for your advice.
>
>
>
> --
> Henry Sequeira
> Costa Rica
>
>
> "Marvin Smit" wrote:
>
> > Hi,
> >
> > use the magic button in Visual Studio (Show all files).
> > This will allow you to expand your webreference and see the generated
> > proxy code and types.
> >
> > I do however want to stress that "modifying generated code" is just
> > not a smart thing to do. Next generation... your code is history!
> >
> > My advise would be to:
> >
> > - Derive from the proxy
> > - Add Interface inheritance to the newly derived class.
> >
> > Hope this helps,
> >
> > Marvin Smit.
> >
> > On Wed, 14 Sep 2005 09:08:04 -0700, "HenrySeque "
> > <He********@dis cussions.micros oft.com> wrote:
> >
> > >I have a webservice and I add a web reference from my web project.
> > >
> > >I want the proxy class to implements an Interface, but I didn't find
> > >the
> > >source code of the proxy class and I don't want to create a Wrapper
> > >for the
> > >proxy.
> > >
> > >Where is the source code? What can I do?
> >
> >

Nov 23 '05 #6

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

Similar topics

2
521
by: sys | last post by:
I have a Web service and I want it to implement an interface that I specified, say IService. So my Web service class looks like this public class Service1 : System.Web.Services.WebService, IServic public Service1( InitializeComponent() [WebMethod
6
2759
by: Martyn Lawson | last post by:
Hi, I am currently working as an Analyst on a .NET Web Project using ASP.NET and C#.NET. I have a couple of, at least what should be, quick questions: 1. My understanding of UML says that the Controller classe of a Sequence Diagram should be implemented as a private class within a component. However, my Programmer has said that since the ASP code lives outside the
3
8088
by: Frans Bouma | last post by:
Hi, I have a serious problem with VB.NET and a DataTable derived class and I can't figure out how to solve it. I have implemented it in C# where it works perfectly, but I can't port one statement to VB.NET and this is crucial: re-implementing ISerializable.GetObjectData() in the DataTable derived class so serializing the datatable derived class will call this method and not the DataTable version (which is private, so overriding is also...
1
2141
by: Mike9900 | last post by:
I want to use an interface in both the webservice and its client. For example, the web service implements an interface and then the client cast that webservice to the inteface. It seems impossible, but I am wondering if there is a way. The code below shows how I want it: /*INTERFACE*/ public interface IEmployee {
1
1868
by: oldVB3r | last post by:
I would like to create a set of web services that share a common set of types (classes, structures, enums). I know I can create a VS 2005 web service based on the Interface statement to contain these common types. The problem is that I cannot determine how to create the implementation web services in a way that I can cast the common types between proxy object parameters in a client app. Please check the snippets of my code: 'Interface...
0
1076
by: ZA_AJR | last post by:
Hi All I have a class (aClass, derived from aBaseClass) with implements an interface IMyInterface. aClass also has a private member of type aNotherClass which raises various events. I would like a specific method within aClass to handle the event raised by the object of type aNotherClass AS WELL as implementing the method of the interface. Unfortunately, the method I've used (outlined below) causes a compiler error. Is there anyway to...
6
3990
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
6
8512
by: Raj Wall | last post by:
Hi, I am trying to implement the IEqualityComparer interface for a struct so I can use it as the Key for a Dictionary. My struct declaration has: public struct Ring : IEqualityComparer { .... } and I am trying to implement the Equals and GetHashCode methods.
5
3551
by: koonda | last post by:
Hi all, I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the internet which helped me little bit. But there are lot of problems I am facing developing the whole game. I have drawn the Board and the two players can play. The players numbers can fill the board, but I have problem implementing the winner for the...
0
8995
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
9378
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
9331
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
9253
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8250
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
4608
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
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.