473,666 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2271
Hi Sarge,

Thanks for your posting. Regarding on this post , I've found your another
duplicated one in the
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet.webs ervices

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*******@news groups.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.publi c.dotnet.framew ork.aspnet.webs ervices,microso ft.public.dotne t
..framework.web services,micros oft.public.webs ervices
NNTP-Posting-Host: 222-153-144-207.jetstream.x tra.co.nz 222.153.144.207
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
microsoft.publi c.dotnet.framew ork.webservices :8417
microsoft.publi c.webservices:1 236
microsoft.publi c.dotnet.framew ork.aspnet.webs ervices:8210
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
10988
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 (and my webmethods) by Java (Apache toolkit) instead of using WSDL. What should I do? Thanks a lot! Raymond
3
1952
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 reference to that web service, the web service proxy is incorrect! It creates its own version of the base class fine, but when it creates its own version of the derived class, it shows it as simply deriving from the base, but its own members are not...
0
1385
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 might have a class that will call GetCustomer and then depending on user input, I might want to DeleteCustomer or UpdateCustomer. In my client code I will need an instance of a proxy class for the web service I want to use and as I see it, there are 3...
12
5323
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 the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
7
1771
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 Application I have an error saying "can't not convert product in product". Someone can help me.
3
2975
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 parameter and returns an array of datasets. The collection consists of database connection objects. Based on the simple hierarchy below, you can see that starting with the
6
3981
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; }
15
13502
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 http://msdn2.microsoft.com/en-us/library/ms996381.aspx Formerly, with classic Microsoft DNA architecture, the ADO Recordset was a primary transport medium, recommended for transmitting data between application tiers. In fact, there are whole books written on the subject.
1
1883
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 when I call a method… but, I would like to replace the send and receive with my own code so I could send the Soap message to an EMS queue and get the response SOAP from another queue instead of calling the web service.
0
8360
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8556
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
8642
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
7387
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
5666
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
4198
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...
1
2774
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
2011
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.