Highlighted
Absent Member.
Absent Member.
744 views

Native Console App utilizing API / Web Service

Getting a new CRM in house and need to be able to call an API from a Native Console App and get the information from the database. Wondering if anybody might have a example of a Visual Cobol, Native Console App that calls API (Rest or Soap) and utilizes WSDL to return the information?

I cannot go directly against database(s), exec sql as I currently do, I need to utilize an Api or web service.

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Which Visual COBOL product and version are you using, Visual COBOL for Eclipse, Visual COBOL for Visual Studio or DevHub?

Visual COBOL provides a tool called the Interface Mapping Toolkit or IMTK which allows you to generate a native client COBOL program from a supplied WSDL (SOAP) or a JSON Schema (REST). You can use these generated clients as-is or adapt them to your own needs.

You can access this directly through a project template in Visual COBOL for Visual Studio 3.0. Select New-->Projects-->COBOL-->Native and then select Web Service Client Application from WSDL/JSON. This will allow you to point to either a WSDL file for your 3rd party SOAP Web Service or a JSON Schema file for your 3rd party REST Web Service. It will generate a native console application from either of these files.
0 Likes
Highlighted
Absent Member.
Absent Member.

Visual COBOL 2.2 for Visual Studio.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

VC 2.2 did not have support for REST services as this was added in 2.3. It did however have support for generating clients for SOAP Web Services from a 3rd party WSDL file, although there was no project template available for this. I believe that it was an option from the Services or Tools menu.

I would strongly suggest that you upgrade to 3.0 if you wish to take advantage of this feature.

Thanks.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.