Thanks for your reply. I can see that it's a convenience to refer to types
this way. However, the classes are conceptually identical even though they
are manipulated independently by both the server and the client and are used
to pass structured messages between the two. What is considered best practice
in this case? I'm sure this is a common requirement but I've not seen a
definitive solution.
Thanks!
> Thanks for your reply. I can see that it's a convenience to refer to types
> this way. However, the classes are conceptually identical even though they
[quoted text clipped - 4 lines]
> in this case? I'm sure this is a common requirement but I've not seen a
> definitive solution.
This is a common request, and the best practice is to realize that the two
classes are not, in fact, equivalent.
This becomes much more clear when you realize that the client and server may
not even be using the same platform. Maybe the client is Java and the server
is .NET. In this case, you would not expect them to share the same class!

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Steven Cheng[MSFT] - 07 Feb 2008 02:48 GMT
Thanks for John's input.
Hi Bill,
If you do need to use shared classes between webservice client and server,
I think you can manually change the auto-generated webservice proxy in
client proxy, modify the return type or parameter types(to match the types
in your class library project). Also, to prevent the modification be reset
when you update proxy, you can add these customized methods(of the proxy
class) in a partial class file which will not be reset by IDE. Here is a
former thread in which I also mentioned this:
http://www.developersdex.com/csharp/message.asp?p=1111&r=5859215
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "John Saunders [MVP]" <john.saunders at trizetto.com>
References: <4A72BA27-F698-4226-8D24-15435D3BD423@microsoft.com>
<ea#sm7NaIHA.4160@TK2MSFTNGP03.phx.gbl>
<C5CFC833-8936-4374-A7EC-169850B91A81@microsoft.com>
Subject: Re: Sharing Data Structures between Client and Server
Date: Wed, 6 Feb 2008 21:00:25 -0500
> Thanks for your reply. I can see that it's a convenience to refer to types
> this way. However, the classes are conceptually identical even though they
[quoted text clipped - 4 lines]
> in this case? I'm sure this is a common requirement but I've not seen a
> definitive solution.
This is a common request, and the best practice is to realize that the two
classes are not, in fact, equivalent.
This becomes much more clear when you realize that the client and server
may
not even be using the same platform. Maybe the client is Java and the
server
is .NET. In this case, you would not expect them to share the same class!

Signature
----------------------------------------------------------------------------
----
John Saunders | MVP - Windows Server System - Connected System Developer