473,408 Members | 2,813 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,408 software developers and data experts.

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 2522
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********@discussions.microsoft.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********@discussions.microsoft.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********@discussions.microsoft.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********@discussions.microsoft.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 MyDerivedWebServiceWithInterface : MyWebservice,
IMyWebInterface {
}

That is all.

Best Regards,

Tiberiu Covaci

"HenrySeque" <He********@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.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********@discussions.microsoft.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
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...
6
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...
3
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...
1
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,...
1
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...
0
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...
6
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...
6
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 {...
5
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.