Проекты

WS/WCF Test Client Plugin

Main window

While I'm working with Web Service I have to write test client for testing this services, including checking for version conflicts. When one of the clients told me that service "not working" bug I can send him a test client to exclude problems with web service or give me exact trace data to determine exact exception location.

When I start to write WCF services, I was glad that in the package with VS there is a tool named WCF Test Client. After that there is no need of writing tests by hand, but not convenient to add services and test data by hand each time.

After I scan working process of WCF Test Client, I decided to figure out how it works from the inside...

First of all for me it was very strange, that client was made proxies only for 32b processors. Accordingly, the client itself was launched through the emulator on a 64b processor. And the problem is not with some specific code, but only with svcutil keys that proxy was made with the key And the point is not in the code, but simply in svcutil where the key for creating a proxy assembly for the 32b processor was passed and that's it...

The second thing that did not suit me was that when a service is added, an assembly proxy was created each time, and when the program is closed, the proxy assembly is erased. Now the proxy is removed only when the address is removed from the list and after that we can check the old client for compatibility with the updated version of the service.

Original user interface is not changed, that's why plugin required assembly from VS installation (See «Limitations»). In additional I've added feature to save last arguments values for each method.

Also I've added a feature to use login and password from settings to use while requesting WSDL.

Settings

  1. Auto save input values: False — Automatically save input values while calling service method to reuse them on next request.
  2. Rewrite Configuration: True — Rewrite .config after service is refreshed. This is important if you changed .config file manually.
  3. Proxy User Name / Proxy Password — Proxy user name and- password (if applicable)
  4. Show SOAP WS Payload: False — Show raw SOAP request and response from service in the WS/WCF testing window. Highlighted as a separate property, because client may freeze when rendering SOAP.

Interaction

Для открытия клиента, необходимо выбрать в меню пп. Tools→Network→WS/WCF Test Client Tools→Test→Network→Service Test Client.

В тулбаре доступна только одна кнопка — добавить сервис. При добавлении сервиса, создание прокси-сборки происходит единожды, при необходимости обновить прокси, необходимо в контекстном меню сборки выбрать элемент "Update".

Окно вызова WebService метода Окно вызова WebService метода с рекурсивным ответом

При двойном нажатии на метод WCF или WS сервиса, откроется окно для тестового вызова сервиса. Тут ничего нового нет и весь алгоритм работы аналогичен стандартому «WCF Test Client» приложению.

Limitations

  1. Для работы клиенту необходима сборка Microsoft.VisualStudio.VirtualTreeGrid, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, которая идёт вместе с Visual Studio. - Включена в архив
  2. While requesting WebService method, SOAP envelope not supported (SOAP headers).
  3. Module depends from WSDL generation process: svcutil.exe, wsdl.exe, disco.exe & SvcConfigEditor.exe (Not exposed to the UI, but implemented searching the installed version of .NET Runtime via the registry)
Теги:

Скачать

Ссылки

Родительские файлы