We are trying to implement JSON in CICS from COBOL but keep getting some weird things going on. We are using bottom-up approach ...taking COBOL copybooks created from a .NET JSON request and creating the JSON schemas. Using the example chapter 11 in redbook Implementing IBM CICS JSON Web Services for Mobile Applications. All the artifacts are created in the z/FS along with the wsbind file. Code has been added to COBOL program using CICS commands to create channels/containers and web open and web post and the DFHJSON link program to convert cobol data to JSON. Bundle and URIMAP created to point to .NET web services
All works well containers DFHJSON-TRANSFRM gets created, DFHJSON-DATA gets created and the link to DFHJSON works and creates the JSON schema containing the data from DFHJSON-DATA
web open works fine but the web converse gets a HTTP 400 - bad request ...what we found out the DFHJSON is putting the whole schema and the .NET side is only expecting the 4 request fields
also when I use the JSON assistants to recreate the wsbind file it doesn't get refreshed and it tries to use previous version of the wsbind/bundle part even though it has been deleted out of the z/FS directory before the new/changed JSON runs
If anyone has experience setting up a CICS JSON as a client to another environment such as .NET ...any suggestions would be greatly appreciated
We have it working after few trial and errors. CICS is acting as a web service client requesting information from Azure. NET....using top-down approach (JSON objects to JSON Schema and COBOL COPYBOOKs) via the JSON assistant DHFJS2LS...no RESTful...Below explains how it works
Have CICS System programmers define
URIMAP - with endpoint
BUNDELS - have to be in own separate z/FS directory (request,response1, response2)
Application programmers do this
1.Use JSON objects supplied by Azure .NET and create JSON schemas at http://jsonschema.net/#/
2. Add the schemas into z/FS with dir names matching to the BUNDLE names which also match the JSON container DFHJSON-TRANSFRM
3. Run DFHJS2LS for each schema with parms pointing to z/FS directory where schemas are located ...this step also creates the COBOL COPYBOOKS
4. After running DFHJS2LS.... JSBIND dir and Metadata and log files will be created in z/FS directory
5. Add the generated COBOL Copybooks and CICS commands PUT/GET JSON CONTAINERs,OPEN/CONVERSE/CLOSE WEB into your COBOL program using examples in Chapter 11 Developing a simple JSON web of the Implementing IBM CICS JSON Web Services for Mobile Applications service client application REDBOOK. The examples from the REDBOOK worked just like they are explained.....
I know it is an old topic but perfectly matches my requirement.
I too am trying to develop a WebService Requester on Mainframe to perform HTTP POST. Previously I have developed WebService Provider and it is straight forward but I am confused on below topic. Can you please explain or provide me materials to read. Thanks.
2) How to create container DFHJSON-TRANSFRM, specifically what to put in it