BloggingAbout.NET
Thoughts of developers
WCF Test Harness: DynamicProxyFactory

This is in response to a post on CodePlex in regards to how to retrieve the metadata of a service.  I based this on a WCF Sample create by Vipul Modi.

DynamicProxyFactory

In the WCF Test Harness solution, the DynamicProxyFactory class is used to generate a proxy class based on a metadata enabled service.  The class performs the following:

  1. Downloads Metadata - uses the System.Web.Services.Discovery.DiscoveryClientProtocol to retrieve the metadata
  2. Imports Metadata - uses the System.ServiceModel.Description.WsdlImporter to extract the bindings, contracts and endpoints
  3. Creates Proxy - generates the proxy code
  4. Writes Proxy - writes the code into memory
  5. Compiles - compiles the proxy code into a temporary assembly

If you are interested in exploring this, I suggest retrieving the source code and investigating the classes located in the Dynamic folder of the Spike.ContractBuilder library.

image

Cheers, Jeff


Posted Tue, Jan 20 2009 10:27 AM by chilberto
Filed under: ,

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Please add 8 and 6 and type the answer here:
Copyright © 2003-2008 BloggingAbout.NET
Powered by Community Server (Commercial Edition), by Telligent Systems