BloggingAbout.NET
Thoughts of developers
WCF Test Harness: Adding a new Proxy via Assembly

The following steps will create a new Proxy by referencing an already defined client proxy:

  1. To illustrate referencing an already compiled client proxy, I first build a client proxy for the Sample Host included in the download.  Launch the sample host by double-clicking the Spike.TestHost.exe located in the TestHost folder:
    image
  2. Next create a new project in Visual Studio for the class library:
     New Project
  3. Then select Add Service Reference...
     
    Add Service Reference
  4. Next enter the URL for the metadata enabled endpoint:
    Add Service Reference 
  5. Build the project and copy the assembly to the ClientAssemblies folder of the Test Harness
    (Note: in Versions earlier than 1.0.1.0, do not copy the .pdb as this will cause all assemblies to fail to load)
     
  6. Next copy the SampleClient.dll.config file:
     
  7. This should be placed in the ClientConfiguration sub-folder of the Test Harness
    (Note: in Versions earlier than 1.0.1.0, you will need to create the ClientConfiguration sub-folder first)
    image
  8. Now that the client has been copied, we are ready to create a new Test Case.  The following are identical steps to those described in Creating a New Test Case and are included here to complete this scenario only
  9. After launching the Test Harness, select New Test Case menu item from the File menu:
    image
  10. Provide a unique name to describe the Test Case and select the SampleClient.dll as the contract name:
    image
  11. Change the name in the message payload to Sally:
    image
  12. Now, click the Execute Single button:
    image
  13. The test case should complete with a 0 being returned:
    image
  14. And the sample host should indicate a message containing customer Sally was received:
    image

Overview


Posted Sun, Nov 16 2008 10:48 AM by chilberto
Filed under: ,

Comments

Jeffrey Chilberto wrote WCF Test Harness Guide updated
on Sun, Nov 16 2008 10:06 PM

I've added a new page to the Guide: Adding a New Proxy via Assembly .

Yaron Naveh wrote re: WCF Test Harness: Adding a new Proxy via Assembly
on Sun, Nov 16 2008 11:47 PM

Very nice!

I think it can be an important feature to add some sort of UI to editing the SOAP. Because currently it is hard to edit big soap envelopes manually.

Add a Comment

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

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