Running the Wizard

To start the Wizard run the DotNetWsdlGenerator.exe either from within Visual FoxPro or as a standalone application from Windows Explorer.

Let's use a sample Web Service from my Web Store application which is a service that returns a few complex types that are nice work with. The service can be found at:

https://store.west-wind.com/service/WebStoreConsumerService.asmx?WSDL

When you run DotNetWsdlGenerator.exe you will end up on a form as shown below. The form will be initially empty and the bottom fields are disabled. Start by either pasting in a WSDL Url or selecting one interactively using the Browse for Web Service link button. Once the WSDL Url is set click on the Resolve button to validate the service and fill in default values for generation. The result looks something like this:

In this case the service name is WebStoreService which will translate into proxy names of WebStoreServiceProxy. This name is used both for the .NET Assembly (the .dll) and the FoxPro class and file name (the .prg file). You can override any of these but these are sensible defaults to make it clear these are client proxy classes.

Finally you can specify where the generated proxies are stored. By default they go into the .\Generated folder below the install folder, but you can send these files anywhere you choose.

Once you have the settings the way you want them click on the Generate button to generate the client assembly and FoxPro proxy class.

Note: Locked Assembly DLL

If for some reason you are re-generating your .NET assembly proxy after you have used the generated FoxPro proxy to make Web service calls you will likely get an error that the .dll file is in use. .NET loads assemblies and never unloads them so you need to shut down Visual FoxPro and restart to unload the proxy assembly in order to re-generate it. It should be rare that you need to re-run the generator.

Next: Examining the generated Proxy Classes


© West Wind Technologies, 2004-2020 • Updated: 06/07/17
Comment or report problem with topic