473,242 Members | 1,793 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,242 software developers and data experts.

Extending web service proxy classes

Hi all,
tough question. Apologies for the cross posting but it is an interesting
architectural problem and I think deserves a wide audience.

What is the best way to extend web service proxy classes so we can add
our own methods and properties?

We have an application that passes a deep hierarchical structure (four
nodes deep) between a webservice and a smart client.
We have built the web service using the Contract First Web Service Tool,
which essentially builds nice web service proxy classes from a WSDL and xml
schemas, nothing new here. This tool uses the xsd.exe generation tool + IDE
integration, rather nice.
On the client side of the application we need to do some complex / semi
real time processing on this hierarchy before sending it back.

We would like to extend the web service proxy classes without modifying
the generated class files directly as we know that these things tend to
change and code generation is a big help in this manner.

We need properties and methods to be added to the individual web service
proxy classes

Attempts
We have tried inheriting from the web service proxy class.
This didn't work so well for two reasons
a) we can't down cast from a super class into sub class. i.e can't
cast from a type Dog into type Dalmatian
b) we have a hierarchy of classes so even if we can get a successful
cast into a Dalmatian class if we have a collection of FriendsToSniff they
would need to be cast as well...

Another option is to recreate the whole hierarchy, this seems to be an
expensive option after all the xmldeserializer has just kinda done all this
creating.

Another other option is use some kind of helper class which we could use to
help with the processing, this would be possible but complicated and would
not support the addition of properties easily as new properties would need
to be implemented as hashtables inside the helper class or something like
that. Helper classes are good for processing but not properties and state.

So you code hounds and architectural sleuths what do you think??

Thanks in advance

Mark


Nov 23 '05 #1
1 2244
Hi Sarge,

Thanks for your posting. Regarding on this post , I've found your another
duplicated one in the
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es

I've posted my response there. Welcome to continue followup and discuss in
that thread.

Thank you!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
From: "Sarge" <en*******@newsgroups.nospam>
Subject: Extending web service proxy classes
Date: Tue, 1 Nov 2005 09:33:01 +1300
Lines: 53
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Message-ID: <uN**************@tk2msftngp13.phx.gbl>
Newsgroups:
microsoft.public.dotnet.framework.aspnet.webservic es,microsoft.public.dotnet
..framework.webservices,microsoft.public.webservic es
NNTP-Posting-Host: 222-153-144-207.jetstream.xtra.co.nz 222.153.144.207
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
microsoft.public.dotnet.framework.webservices:8417
microsoft.public.webservices:1236
microsoft.public.dotnet.framework.aspnet.webservic es:8210
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Hi all,
tough question. Apologies for the cross posting but it is an
interesting
architectural problem and I think deserves a wide audience.

What is the best way to extend web service proxy classes so we can add
our own methods and properties?

We have an application that passes a deep hierarchical structure (four
nodes deep) between a webservice and a smart client.
We have built the web service using the Contract First Web Service
Tool,
which essentially builds nice web service proxy classes from a WSDL and xml
schemas, nothing new here. This tool uses the xsd.exe generation tool + IDE
integration, rather nice.
On the client side of the application we need to do some complex / semi
real time processing on this hierarchy before sending it back.

We would like to extend the web service proxy classes without modifying
the generated class files directly as we know that these things tend to
change and code generation is a big help in this manner.

We need properties and methods to be added to the individual web
service
proxy classes

Attempts
We have tried inheriting from the web service proxy class.
This didn't work so well for two reasons
a) we can't down cast from a super class into sub class. i.e can't
cast from a type Dog into type Dalmatian
b) we have a hierarchy of classes so even if we can get a
successful
cast into a Dalmatian class if we have a collection of FriendsToSniff they
would need to be cast as well...

Another option is to recreate the whole hierarchy, this seems to be an
expensive option after all the xmldeserializer has just kinda done all this
creating.

Another other option is use some kind of helper class which we could use to
help with the processing, this would be possible but complicated and would
not support the addition of properties easily as new properties would need
to be implemented as hashtables inside the helper class or something like
that. Helper classes are good for processing but not properties and state.

So you code hounds and architectural sleuths what do you think??

Thanks in advance

Mark



Nov 23 '05 #2

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

Similar topics

2
by: raymond | last post by:
Hi, Is it possible to create a proxy client class or a web service method by VS.NET without using wsdl? My stupid client is using a xml schema (.xsd) to describe all their web service methods...
3
by: Marty McDonald | last post by:
Using Visual Studio.Net... I have two classes, one derives from the other. My web service accepts the base class as input, it returns the derived class as the return value. When I set a web...
0
by: John O'Neill | last post by:
Hi I would like some advice on how best to use web service proxy classes. Lets say I have a web service with 3 methods to GetCustomer, DeleteCustomer and UpdateCustomer. In my client code I...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
7
by: Lumina | last post by:
I have a class "product" in a Web Project with the ensamblie. In otherside I Have a Web Service and I want to return an product class object, but when I want to received this object in the Web...
3
by: Dave | last post by:
Please - anyone that can help. I am getting confusing results while trying to expose a collection from a web service. I have a webservice in which a web method accepts a collection as a...
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...
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
1
by: =?Utf-8?B?UnVp?= | last post by:
Can I override the send and receive methods on a web service proxy? I want to use the default proxy classes generated when I add a reference to a web service to create and read the SOAP messages...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.