Hi,
Please tell me about Publish RESTful Web Services.
1.Can I debug server modules which REST API definition is set up?
2.Is there a manual on Publish RESTful Web Services?
I confirmed the following two.
https://docs.lansa.com/14/en/lansa004/i ... 2_0040.htm
viewtopic.php?f=3&t=1915&p=4846&hilit=Publish#p4846
Please tell me if you have a more detailed manual.
Thank you.
Best regards,
Rieko Saitoh
LANSA japan
Questions about Publish RESTful Web Services
-
Rieko Saitoh
- Posts: 58
- Joined: Sat Apr 30, 2016 11:46 am
Re: Questions about Publish RESTful Web Services
Docs are pretty lacking at the moment.
This topic may be of help some if you have not found it.
viewtopic.php?f=3&t=1915&p=5089
Regarding the debugging, you can debug, but not like you are probably used to.
I got this trick from Support while tying to debug my own services.
Part of the compilation process of a server module with an API definition is the creation of a "webmodules.conf" file in the Lansa Install /run/conf folder. That file is a simple JSON file that maps URLS to Server Module routines.
In that file you can set x_run args to enable debugging on at the module or routine level.
or
Hope this helps,
Joe
This topic may be of help some if you have not found it.
viewtopic.php?f=3&t=1915&p=5089
Regarding the debugging, you can debug, but not like you are probably used to.
I got this trick from Support while tying to debug my own services.
Part of the compilation process of a server module with an API definition is the creation of a "webmodules.conf" file in the Lansa Install /run/conf folder. That file is a simple JSON file that maps URLS to Server Module routines.
In that file you can set x_run args to enable debugging on at the module or routine level.
Code: Select all
{
"-auto-alias": false,
"default": {
"language": "ENG",
"partition": "SYS",
"x_run_args": "DBHT=mycomputername:mydebugport"
},
Code: Select all
{
"aliases": [
"/A009/EchoParm/{Parm1}"
],
"method": "Get",
"module": "A009",
"routine": "EchoParm",
"partition": "dem",
"x_run_args": "DBHT=mycomputername:mydebugport"
},
Joe
-
pkoopmanpk
- Posts: 49
- Joined: Wed Apr 26, 2017 7:12 pm
Re: Questions about Publish RESTful Web Services
Should I restart something to start debugging? I tried this, but nothing happens when I just edit /run/conf/webmodules.conf on IBMi.
Re: Questions about Publish RESTful Web Services
You may have to restart the subsystems. I have not tried this on the IBMi, only used it on my Windows dev box.
Joe
Joe
-
marcel.heij
- Posts: 15
- Joined: Thu Aug 15, 2019 4:35 pm
Re: Questions about Publish RESTful Web Services
I am not getting this to work. Using Visual Lansa V15 with the latest EPC's on Windows, but nothing seems to happen after adding the suggested lines to the webmodules.conf and even restarting IIS. Are there any other steps to do or does someone have other suggestions?
Re: Questions about Publish RESTful Web Services
Hi marcel.heij and pkoopmanpk
Jyoung left out a vital argument in his instructions for enabling debug
The correct line would be
"x_run_args": "DBUG=Y DBHT=computername:debugport"
Ensure that your webserver is configured to allow interactive debugging (Web Administrator, Connect, Configure System-> Data/Application server, Miscellaneous "Allow Interactive Debugging") you would need to restart your web server after making this change.
Jyoung left out a vital argument in his instructions for enabling debug
The correct line would be
"x_run_args": "DBUG=Y DBHT=computername:debugport"
Ensure that your webserver is configured to allow interactive debugging (Web Administrator, Connect, Configure System-> Data/Application server, Miscellaneous "Allow Interactive Debugging") you would need to restart your web server after making this change.
-
marcel.heij
- Posts: 15
- Joined: Thu Aug 15, 2019 4:35 pm
Re: Questions about Publish RESTful Web Services
Thanks, much better with this vital argument!