robertb_NZ
Well-known member
Program JSPG2 is a COBOL program providing a REST (.json) web service that was generated by MANASYS Jazz, and compiled into a mainframe environment as a CICS web service. I have successfully tested it with SOAPUI. Now I want to develop client-side logic to invoke this service: I want to enhance MANASYS Jazz so that when it generates a program like JSPG2 it also creates corresponding interface objects (VB.Net, C#, Java) to encapsulate all the interface rules, so that client-side logic can simply refer to the interface object's properties and methods. This will make it very easy for the client-side developer to access the service, and the generated logic will guarantee that client-side input validation is consistent with server-side validation.
However my immediate objective is to create just one VB.Net program to invoke program JSPG2 so that I have a pattern to work from.
I Googled "Post to Web Service vb.net" which found this - Set up POST REST Service - that looked exactly what I wanted, but when I tried their example I couldn't get it to compile: because of Message BC30002 for 'ApiController' and 'FromBody'
Message BC30002 Type 'ApiController' is not defined
ApiController is defined in System.Web.http so it should have been be OK, but the documentation hints that ApiController has been replaced.
Perhaps this is the wrong approach? What is the best tutorial for me to I read? Preferably VB, but C# is also OK.
However my immediate objective is to create just one VB.Net program to invoke program JSPG2 so that I have a pattern to work from.
I Googled "Post to Web Service vb.net" which found this - Set up POST REST Service - that looked exactly what I wanted, but when I tried their example I couldn't get it to compile: because of Message BC30002 for 'ApiController' and 'FromBody'
VB.NET:
Imports System.Net
Imports System.Web.Http
Public Class JSPG2Controller
Inherits ApiController
...
ApiController is defined in System.Web.http so it should have been be OK, but the documentation hints that ApiController has been replaced.
Perhaps this is the wrong approach? What is the best tutorial for me to I read? Preferably VB, but C# is also OK.