This project is read-only.

Project Description

When come to creating Web Service client, we all know that there is a menu option called "Add Web Reference". This works great until we realized the we want our client to implement our domain interface and takes/returns our domain objects.

Spring.Net solved this problem by generating a dynamic proxy at runtime that implements the domain interface, but the startup performance becomes a big problem. SGen cannot pre-generate XmlSerializer for those dynamic proxies simply because they don't exist at compile time.

Web Service Source Code Generator does what Spring.Net do in compile time. So that we can have our Web Service client implements our own domain interface and still startup fast.

For more information about the slow startup performance issue of Spring.Net dynamic Web Service client proxy issue, see this forum thread and this blog


  • Generate Web Service client source code that implements domain interface.
  • Code is generated at compile time so that the serialization assembly can be pre-generated to avoid creation of temporary assemblies by XmlSerializer at runtime. Hence, better startup performance.
  • Can integrate with VS.Net build process easily.
  • Code generation is driven by an XML configuration file or any XML file along with an XSLT file to transform it. So you can transform a framework's XML file for configuration. For example, Spring.Net configuration file can be used to configure the code generation with a proper XSLT file to avoid the multiple configuration files.


This blog post has an example VS.Net solution to show you how to use this generator step by step. If you are using ClickOnce deployment, make sure you also check out this article.

Using the WSCodeGen to repalce the Spring.Net's WebServiceClientProxy is easy. You can even use the Spring's XML configuration to control the generation of client code. Here is a real world example.


Please post you questions to the Discussions tab and report bugs and enhancement request to the Issue Tracker.

Last edited Sep 21, 2008 at 5:21 PM by kennethxu, version 12