Questions about Publish RESTful Web Services

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Rieko Saitoh
Posts: 37
Joined: Sat Apr 30, 2016 11:46 am

Questions about Publish RESTful Web Services

Post by Rieko Saitoh » Tue Feb 26, 2019 5:12 pm

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

jyoung
Posts: 643
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Questions about Publish RESTful Web Services

Post by jyoung » Wed Feb 27, 2019 1:35 am

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.

Code: Select all

{
  "-auto-alias": false,
   "default": {
    "language": "ENG",
    "partition": "SYS",
      "x_run_args": "DBHT=mycomputername:mydebugport"
  },

or

Code: Select all

    {
      "aliases": [
        "/A009/EchoParm/{Parm1}"
      ],
      "method": "Get",
      "module": "A009",
      "routine": "EchoParm",
      "partition": "dem",
      "x_run_args": "DBHT=mycomputername:mydebugport"
    },
Hope this helps,
Joe

Post Reply