65.9K
CodeProject is changing. Read more.
Home

Golabi Webservice Dynamic Invoker

starIconstarIconstarIconstarIconstarIcon

5.00/5 (7 votes)

May 13, 2013

CPOL

1 min read

viewsIcon

28701

downloadIcon

683

Dynamic web service code generator

Introduction

In some projects, we need to add a reference to an inter network web service that is not public on the Internet.

We need some kind of tool to make a reference to that web service without taking our development tools to that network.

Background

In this project, we use wsdl.exe to generate a class from a web service URL:

Then we use csc.exe to generate a DLL from the generated class from the last step:

In the last step, we use the System.Reflection class to invoke the methods of the DLL.

Using the Application

First of all, you should mention the URL and the version of .NET Framework you want to use for compiling the generated class. Then click Discover button in the form:

In the code tab, you can see the generated class from the given web service URL.

In the Explorer tab, you can see the reflected methods from the generated DLL:

By pressing Invoke button, the input form will be dynamically generated:

After giving the parameters, you can receive the result from web service:

Points of Interest

This tool is some kind of Code Generators Application. There are some cool Dynamic invocation tools inside this project that you should discover by yourself!