webservices and "reuse types in referenced assemblies"

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I see that this has been asked before, but there seem to be no
(working) resolutions.

I want to share the exact types used in webrequests between the client
and the server. The proxy is too pale a representation of the actual
class used by the server: there are useful functions like ToString
overrides etc that I want the client to use.

So when I create the service reference (VS 2008) I check the advanced
option to reuse the types, making sure that the assembly containg the
types and their interfaces is referenced. But the generated
resources.cs seems to be pretty much identical to without.

I have been able to modify the file to make it use the referenced
assembly, but then of course it gets overqritten if you update the
service reference. It seems to me that what I want is exactly what is
promised by that option, but it fails to do anything when selected. Is
there something that I am missing? Has anyone managed to get this to
work?

Thanks
.



Relevant Pages

  • Re: webservices and "reuse types in referenced assemblies"
    ... I want to share the exact types used in webrequests between the client ... class used by the server: there are useful functions like ToString ... So when I create the service reference I check the advanced ... making sure that the assembly containg the ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: webservices and "reuse types in referenced assemblies"
    ... I want to share the exact types used in webrequests between the client ... class used by the server: there are useful functions like ToString ... So when I create the service reference I check the advanced ... making sure that the assembly containg the ...
    (microsoft.public.dotnet.framework.webservices)
  • Soap class definition question
    ... server it allows me to use the common class in the method. ... Now when the client tries to call that method on the service I need to use ... The service reference on the client seems to allow for this in its "Service ...
    (microsoft.public.dotnet.xml)
  • Adding Service References
    ... I'm trying to add a service reference to a client project (using the "Add ... If i remove the HTTP endpoint from my service project (or set httpGetEnabled ... if the service only have one TCP endpoint ?? ...
    (microsoft.public.dotnet.framework)
  • "Reuse types" option ignored when creating a service reference
    ... would like to reuse the value object classes I've already defined ... instead of having the service reference generate it's own proxy ... -- CentralizationRequest class ... So both Client and Server reference Data, ...
    (microsoft.public.dotnet.framework.webservices)