O'Reilly logo

Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications by Steven Cheng

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reusing types between service and client

Usually, we will use some custom types in our WCF service operations as parameters or return values. When generating a WCF client proxy through the Visual Studio Add Service Reference context menu item, it will help to generate some skeleton types (that have the same serialization format with the custom types used in the server-side service) at the client-side instead of directly using the server-side types. However, sometimes we will need to reuse the existing types used at the server side instead of using the auto-generated skeleton types.

How to do it...

  1. Centralize all the types that we need to reuse, in a separate class library/assembly.

    The first thing we need to do is gather all those custom types (used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required