Windows Communication Foundation (WCF) is part of Microsoft's .NET Framework that enables you to build service-oriented applications. WCF services consist of a number of operations which you can expose to client applications through different endpoints.
With Visual COBOL you can create and access WCF COBOL services for the .NET Framework version 4.5 or later.
The following is a brief overview of the process of creating and consuming a WCF service:
A contract is an interface that includes the operations that a service endpoint exposes to the client applications.
You can define this as a COBOL class that implements the interface and the methods that represent the service operations.
You specify the details for accessing the WCF service (the host and the endpoint details) in the App.config file in your project. You can use the WCF configuration editor to edit the App.config file - right-click the file and select Edit WCF Configuration.
You need to specify the service endpoints through which the service functionality is exposed, and enable metadata exchange for the service. The general details, or so called ABC, of an endpoint are: the address of the service, its binding and the service contract which is exposed. The WCF Service Library template has preconfigured endpoint and metadata exchange details which you might need to modify.
Visual Studio provides a WCF Host Application and a WCF Test Client to enable you to host and test your services without a client application.
This is the application that accesses and consumes your service. The client connects to the WCF service through one of its endpoints and uses the service operations that are exposed.
You can create the client application as a new project in your WCF solution and add a service reference to the WCF service project. From the context menu for the project invoke the Add Service Reference dialog and use it to discover and select the services in the solution.
You specify the endpoint details for accessing the WCF service (the service address , the binding, the service name and contract) in an app.config file for the project for the client application.
When the WCF service project is part of the solution that contains the client application, the service is usually hosted automatically when you start debugging. You can configure this in the project properties for the WCF service project.
For more, check Tutorial: Creating and Accessing WCF COBOL Services and the WCF Book Service and Client demonstration in the Samples.