Generate COBOL and WPF Clients

Walks you through the process of setting client generation properties, generating COBOL and WPF clients for the MakeCheckAppt REST Web service, and building the WPF client project in preparation for debugging.
Restriction: This topic applies only when the Enterprise Server feature is enabled.

You can now generate clients to access the MakeCheckAppt service that you deployed to the ESREST enterprise server instance.

Set client generation properties

The generation process automatically produces a console client; however, you can set an option that enables the additional generation of a WPF client.

  1. From the Visual Studio main menu, click Tools > Options.
  2. Expand Micro Focus Tools, and then click Service Interfaces.
  3. Check WPF Application
  4. Uncheck all other client types, if necessary, and then click OK.

Generate clients

  • From the Solution Explorer, right-click the MakeCheckAppt service interface; then select Generate Clients from the context menu.
You can watch the generation process in the Output window. When it is complete, you'll see the message "Generation succeeded". You should see that two projects have been added to the Solution Explorer:
  • MakeCheckApptClientApp - the console client
  • MakeCheckApptWPFApp - the WPF client

Each new project contains the client files required to successfully access the MakeCheckAppt service now running on the ESREST enterprise server.

Register the proxy library

Depending on your Windows operating system version, you might be required to register the Proxy Library after generating a client for the first time. If a message appears in the Output window indicating that registration is necessary, follow these steps:

  1. Start a Visual COBOL command prompt as an administrator. If you need instructions, see To start a Visual COBOL command prompt as an administrator.
  2. Change to the c:\tutorials\IMTK\ProgramREST\MakeCheckApptWPFApp\Bin\Release directory (specified in the Output window).
  3. Enter regsvr32 MakeCheckApptProxyWrapper.dll.
  4. Click OK to clear the RegSvr32 message.

Build the WPF client project

You need to build a client project before running it. Because you will be debugging using the WPF client, you must first build its project:

  • On the Solution Explorer, right-click the MakeCheckApptWPFApp project, and then select Build from the context menu.