>>>> I tried changing the JOBD lib list that is in the config file but that did not work. And I added a SetEnv QIBM_CGI_LIBRARY_LIST but no luck there either. What controls the lib lists? <<<<
This can be done using the SetEnv directive with the QIBM_CGI_LIBRARY_LIST environment variable and a list of the libraries. Be sure to uppercase the library names and separate them by semi-colons. For example: SetEnv QIBM_CGI_LIBRARY_LIST "MIME;CGIURL;CGILIBL"
The listed libraries replace the libraries in the user part of the library list. When the CGI program has finished processing, these libraries will be removed from the library list and the library list will be restored to what it was before the CGI program ran.
If you did, try restarting the deployed server to see if it solves the issue.
Original Message:
Sent: Wed April 10, 2024 08:35 AM
From: John Ricciardelli
Subject: IBM web admin for i
I have the HTTP server all set up with security (HTTPS) so my next question is how do I change the library list of for the programs being called that are listed in the config file with ScriptAlias?
I tried changing the JOBD lib list that is in the config file but that did not work. And I added a SetEnv QIBM_CGI_LIBRARY_LIST but no luck there either. What controls the lib lists?
Thanks
John
------------------------------
John Ricciardelli
Original Message:
Sent: Mon April 01, 2024 10:25 AM
From: Steven Riedmueller
Subject: IBM web admin for i
It's not too complicated. You'll want to access DCM and create a new "application" definition. Then you can assign a certificate to that application, and use that application name in your HTTP server under the HTTPAdmin "Security" section.
You have the option of obtaining a certificate from DigiCert or other certificate authority, or using a "Local CA" within the DCM to generate a cert. If you have full control over the client systems, you can just use the local CA and you won't have to pay for a cert.
------------------------------
Steven Riedmueller
Certified IBM i Admin
Speaker, Mentor, and Advocate
Original Message:
Sent: Mon April 01, 2024 10:02 AM
From: John Ricciardelli
Subject: IBM web admin for i
Happy to help out anyone avoid the same struggles as me and thanks for the kind words.
Now that I have the HTTP server and my API program working, my next question is: How do add security to my HTTP server? Turn my "HTTP://" into "HTTPS://"? Are there any good detailed instructions out there?
thanks
------------------------------
John Ricciardelli
Original Message:
Sent: Mon April 01, 2024 09:33 AM
From: Steven Riedmueller
Subject: IBM web admin for i
I just want to express my appreciation for you John, for posting your updates and eventually solution in this thread! It will be super helpful to anyone who has the same issue and finds themselves here.
------------------------------
Steven Riedmueller
Certified IBM i Admin
Speaker, Mentor, and Advocate
Original Message:
Sent: Sun March 31, 2024 07:54 PM
From: John Ricciardelli
Subject: IBM web admin for i
Answered my own question and for future reference . . . . I just made the request field below CCSID(*UTF8) and it worked!
QtmhRdStin(request:%Size(request) : rtnLen: err);
------------------------------
John Ricciardelli
Original Message:
Sent: Sun March 31, 2024 04:39 PM
From: John Ricciardelli
Subject: IBM web admin for i
I got it to work for application/json with:
Data-into InputDS
%DATA('*STDIN':'doc=string allowmissing=yes allowextra=yes trim=all case=convert')
%PARSER('YAJLINTO');
Next question: How do I do the same thing with XML?
------------------------------
John Ricciardelli
Original Message:
Sent: Sun March 31, 2024 01:55 PM
From: John Ricciardelli
Subject: IBM web admin for i
I am making progress. When I test with postman and send the reqeust as application/json and call QtmhRdStin( request:%Size(request) : rtnLen: err);
Request comes back as #█ãÑ%ÈÁÊ██#█ëÁ/ÊÄÇ███ä êà████████████████'██████████████' '
bu if I send as text/plain from postman it comes back corectly formatted. My question is how to I send it as application/JSON from postman and have it formatted correctly?
Thanks
------------------------------
John Ricciardelli
Original Message:
Sent: Fri March 29, 2024 11:05 AM
From: John Ricciardelli
Subject: IBM web admin for i
Thank you nadir. So I have to create these outside of IWS (Do it yourself version). Probably better for me to learn JSON handling. Any tips on how to program for where there is a datastructure coming in and going out (so input paramters not in URL like in Scott Klements example in the above PDF). Once again I greatly appreciate all the help/advice!
------------------------------
JOHN RICCIARDELLI
Original Message:
Sent: Fri March 29, 2024 10:52 AM
From: Nadir K Amra
Subject: IBM web admin for i
At this time, there is no way to tell IWS to ignore unexpected fields in a client request. And the error happens prior to reaching the web service, so you cannot override the message. However, work is being done on this and you should open an IDEA so we can prioritize.
We understand this is an important issue.
------------------------------
Nadir K Amra
Original Message:
Sent: Thu March 28, 2024 08:44 PM
From: JOHN RICCIARDELLI
Subject: IBM web admin for i
I did create this with the IWS wizard. I was hoping that there was some configuration I could change (or add) that would allow it to ignore unrecognized field names from the request. If that is not possible then I was hoping to also get some informatoin on how to send back a JSON error message when that error did occur (before it calls the RPG program). So if an unrecognized field is sent and it gets a 500 error how to add the custom error message. I already added teh following to the config file:

Any advice is greatly appreciated!
Thank you
------------------------------
JOHN RICCIARDELLI
Original Message:
Sent: Thu March 28, 2024 03:39 PM
From: Jon Paris
Subject: IBM web admin for i
Do you mean this is an IWS service created with the Wizards? In that case, I have no idea how you could achieve this since the PCML for the RPG should have set the parm list properly for you.
If you didn't use PCML and coded it by hand, I suggest you re-do it with PCML.
If this isn't IWS related we'll need to know a lot more about how you set this up.
------------------------------
Jon Paris
Original Message:
Sent: Tue March 26, 2024 02:24 PM
From: JOHN RICCIARDELLI
Subject: IBM web admin for i
In IBM Web Admin for i, I have an http server running with a deployed service (that calls an RPGLE program). It's all working great. Is there a way to ignore unrecognized fields (keys) that are passed in so I do not get the error below?
"Error 500: javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "BillAcctIddd" (Class iseries.wsbeans.getcustomers.CustomersFilterDS_T), not marked as ignorable
at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@4846cb18; line: 3, column: 21
] (through reference chain: iseries.wsbeans.getcustomers.CustomersFilterDS_T["BillAcctIddd"
])"
------------------------------
JOHN RICCIARDELLI
------------------------------