Page 1 of 1
HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Thu Aug 24, 2023 4:16 am
by yadulacontrol
Hi,
We have an old service (HTTP inbound request) which was never changed. Recently we went to Lansa 15. This inbound service is used by our partner software. Suddenly it stopped working. I have tried several ways to access it using POSTMAN in QA environment. But I get the same results as customers. So, I created a test processing function and put log statements to a logfile. Found it never reads the parameters. It is also specified in Integrator logs – TRANSPORT.TXT as follows.
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
I have researched everything that I can including different syntaxes of HTTP commands, creating outbound service to access same inbound HTTP request but has not been successful.
Has anyone come across this issue with Lansa 15 ? OR any suggestions ?
Here are many ways I have tried to access service including without parameters.
XXXXXX/cgi-bin/jsmdirect?SERVICE=GetSalesTicketPDF.TEST&COMPANY=00&TICKETNBR=8140121
OR
XXXXXXX/cgi-bin/jsmdirect?GetSalesTicketPDF.TEST+COMPANY(00)+TICKETNBR(8140121)
Or
XXXXXX/cgi-bin/jsmdirect?SERVICE=GetSalesTicketPDF.TEST
Here are parts of test code… It never receives parameters. #LISTCOUNT is zero.
Def_List Name(#REQUEST) Fields(#REQ_NAME #REQ_VALUE) Counter(#LISTCOUNT) Type(*WORKING)
* Receive all posted values
Change Field(#JSMCMD) To('RECEIVE HANDLER(INBOUNDNAMEVALUE) BIND(*LIST) SERVICE_LIST(REQ_NAME, REQ_VALUE)')
Use Builtin(JSM_COMMAND) With_Args(#JSMCMD) To_Get(#JSMSTS #JSMMSG #REQUEST)
If Cond('#JSMSTS *NE OK')
Change Field(#W_TEXT) To('EXITED FROM RECIEVE')
Execute Subroutine(RD_DEBUG) With_Parms(#W_TEXT)
Return
Endif
If Cond('#listcount *EQ 0')
Change Field(#ERRMSG #W_TEXT) To('Did not read the list - Incoming Paratmeters')
Execute Subroutine(RD_DEBUG) With_Parms(#W_TEXT)
Endif
Thank you,
Yadula.
Re: HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Thu Aug 24, 2023 8:04 pm
by René Houba
Hi Yadula,
Can you check de web job on the iSeries please...
Do you see messages like this in the joblog related to DC@W05 for example:

- DC@W05 changed in V15.PNG (36.99 KiB) Viewed 11279 times
Then that is the problem...
I will explain.
DC@W05 contains the active web sessions. This table had been changed in LANSA V15 (record length in V14 was 997, in V15 this is 1519).
At a customer, I had different web issues and it seems that during the upgrade to V15, the DC@W05 table was still in use, or locked, so not upgraded during the upgrade to V15.
Table DC@W05 is located in the LANSA COM lib. Using DSPFD on the iSeries you can check the record length:

- DSPFD.PNG (28.52 KiB) Viewed 11279 times
Kind reards,
René
Re: HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Thu Aug 24, 2023 10:30 pm
by yadulacontrol
Hi Rene,
I looked at job log under subsystem QHTTPSVR. I did not see a message you are referring to.
Also DC@w05 seems correct too.
On DSPFD DC@w05 -
Total number of formats : 1
Total number of records : 19
Total record length : 1519
Any other ideas ?
Note: I was not able to paste the portion of DSPFD DC@W05 here using snipping tool or print screen even. Not sure how you did it so I typed relevant information.
Thank you,
Yadula.
Re: HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Fri Aug 25, 2023 12:24 am
by yadulacontrol
Hi Rene,
I wanted to give parts of code in Service Parser function. It goes past Recieve Handler but #REQUEST list is empty. RD_DEBUG just logs to a log
file.
Def_List Name(#REQUEST) Fields(#REQ_NAME #REQ_VALUE) Counter(#LISTCOUNT) Type(*WORKING)
* Open service
Use Builtin(JSM_OPEN) To_Get(#JSMSTS #JSMMSG)
If Cond('#JSMSTS *NE OK')
Return
Endif
* Load service
Change Field(#JSMCMD) To('SERVICE_LOAD SERVICE(HTTPSERVICE) BIND(*FIELD) SERVICE_EXCHANGE(*FIELD) TRACE(*YES)
TRACE_NAME(*FUNCTION)')
Use Builtin(JSM_COMMAND) With_Args(#JSMCMD) To_Get(#JSMSTS #JSMMSG)
If Cond('#JSMSTS *NE OK')
Return
Endif
* Receive all posted values
Change Field(#JSMCMD) To('RECEIVE HANDLER(INBOUNDNAMEVALUE) BIND(*LIST) SERVICE_LIST(REQ_NAME, REQ_VALUE)')
Use Builtin(JSM_COMMAND) With_Args(#JSMCMD) To_Get(#JSMSTS #JSMMSG #REQUEST)
If Cond('#JSMSTS *NE OK')
Return
Endif
* ---- Following is in my temporary code
Change Field(#W_TEXT) To('REACHED AFTER RECIEVE REQUEST')
Execute Subroutine(RD_DEBUG) With_Parms(#W_TEXT)
If Cond('#listcount *EQ 0')
Change Field(#ERRMSG #W_TEXT) To('Did not read the list - Incoming Paratmeters and hence it is taking repository default value of
#COMPANY')
Execute Subroutine(RD_DEBUG) With_Parms(#W_TEXT)
Use Builtin(CONCAT) With_Args('Default value of the varible ' '#COMPANY in Lansa repository is ' #COMPANY) To_Get(#W_TEXT)
Execute Subroutine(RD_DEBUG) With_Parms(#W_TEXT)
Endif
*-----------------
Selectlist Named(#REQUEST)
Use Builtin(UPPERCASE) With_Args(#REQ_NAME) To_Get(#REQ_NAME)
Case Of_Field(#REQ_NAME)
When Value_Is('= COMPANY')
Change Field(#COMPANY) To(#REQ_VALUE)
When Value_Is('= TICKETNBR')
Change Field(#TICKETNBR) To(#REQ_VALUE)
Endcase
Endselect
* Get Remote Address and verify if authorized
Use Builtin(JSM_COMMAND) With_Args('GET PROPERTY(REMOTE-ADDRESS)') To_Get(#JSMSTS #JSMMSG)
Change Field(#WSH0008) To(#JSMMSG)
Thank you,
Yadula.
Re: HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Fri Aug 25, 2023 4:00 am
by René Houba
Hi Yadula,
LANSA Integrator should have trace info related to this in the SERVICES.TXT file, for example:

- TRACE.PNG (38.52 KiB) Viewed 11268 times
Can you find these?
If this is running on an iSeries, they are located on the IFS.
Kind regards,
René
Re: HTTP Inbound request does not read parameters correctly after going to Lansa 15
Posted: Fri Aug 25, 2023 5:15 am
by yadulacontrol
I am going to put all files from Integrator trace folder
HTTPCONTENT.TXT - Empty
SERVICE.TXT
HTTP_KEYOWRDS.TXT
TRANSPORT.TXT - This also says List-entry count is 0.
HTTP_RESPONSE_CONTENT.txt
HTTP_REPONSE_PROTOCOL.TXT
Last two files are showing error due to empty list. The parsing program is supposed to read #COMPANY as 00 (parameter COMPANY(00)). Since it is empty and in our repository it has a default value *COMAPANY - system variable which is set to 'Control V14 Development' for now, it gets passed along. There is a slight bug. Service parser function should have indicated empty list and not gone ahead validating company and processing but I did not write this code. It is very old. This service has been working all along.
Just trying to figure out why it suddenly stopped working.
====================================START SERVICE.TXT =================================
=================== TRACE OPEN ===================
manager: version : 15.0
manager: date : 2023-08-24 13:46:38 -0500
--------------------------------------------------
Process : WSHANDLERS
Function : WSHIN08
Partition : D61
Job Name : V61CONCEN
Job User : WEBV6R1
Job Number : 004926
Command : SERVICE_LOAD TRACE(*YES) BIND(*FIELD) SERVICE_EXCHANGE(*FIELD) TRACE_NAME(*FUNCTION) SERVICE(HTTPSERVICE)
Create trace file : HTTP_KEYWORDS.TXT
Create trace file : HTTP_CONTENT.TXT
Context is inbound
Command : OK "Service successfully loaded"
--------------------------------------------------
--------------------------------------------------
Process : WSHANDLERS
Function : WSHIN08
Partition : D61
Job Name : V61CONCEN
Job User : WEBV6R1
Job Number : 004926
Command : RECEIVE SERVICE_LIST(REQ_NAME, REQ_VALUE) BIND(*LIST) HANDLER(INBOUNDNAMEVALUE)
Receive content handler : com.lansa.jsm.service.InboundNameValueHandler
Using inbound content handler type 2
InboundNameValueHandler receive method has been invoked
No content to receive
Command : OK ""
--------------------------------------------------
--------------------------------------------------
Process : WSHANDLERS
Function : WSHIN08
Partition : D61
Job Name : V61CONCEN
Job User : WEBV6R1
Job Number : 004926
Command : GET PROPERTY(REMOTE-ADDRESS)
Command : OK "10.200.50.129"
--------------------------------------------------
--------------------------------------------------
Process : WSHANDLERS
Function : WSHIN08
Partition : D61
Job Name : V61CONCEN
Job User : WEBV6R1
Job Number : 004926
Command : SEND HANDLER(INBOUNDFILE) CONTENT(*TEXTPLAIN) FILE(/temp/WebServiceError_004926.txt) MESSAGE(Invalid Company Control V14 Development; has to be a number) STATUS(400)
Send content handler : com.lansa.jsm.service.InboundFileHandler
Using outbound content handler type 2
InboundFileHandler send method has been invoked
Send file content
Create HTTP inbound response from byte array
Use outbound encoding : UTF-8
Output mode : BINARY
Using protocol encoding : ISO8859_1
Append charset : utf-8
Create trace file : HTTP_RESPONSE_CONTENT.TXT
Server software : Apache
Create trace file : HTTP_RESPONSE_PROTOCOL.TXT
Response has been created
Command : OK ""
--------------------------------------------------
=================== TRACE CLOSE ==================
==================== END HTTP_RESPONSE_CONTENT.txt ==============================
=============================START HTTP_KEYWORDS.TXT ======================================
[POSTMAN-TOKEN] [cbf6a567-d334-47b7-b935-eb32f8e118b3]
[CACHE-CONTROL] [no-cache]
[SERVER-SOFTWARE] [Apache]
[CGI-ASCII-CCSID] [819]
[ACCEPT] [*/*]
[USER-AGENT] [PostmanRuntime/7.32.3]
[CGI-INPUT-MODE] [BINARY]
[CGI-EBCDIC-CCSID] [37]
[QUERY-STRING] [GetSalesTicketPDF.TEST+COMPANY(00)+TICKETNBR(8140121)]
[SERVER-NAME] [XXXXXXXXXXXXXXX]
[SERVER-PROTOCOL] [HTTP/1.1]
[REQUEST-ID] [ZOeljQrIMikDph-qeOcAAABU]
[REMOTE-ADDRESS] [10.200.50.129]
[CONTENT-LENGTH] [0]
[CONNECTION] [keep-alive]
[ACCEPT-ENCODING] [gzip, deflate, br]
[SERVER-PORT] [2354]
[REQUEST-METHOD] [GET]
[HOST] [XXXXXXXXXXXXXXXXXXXXXXXX]
[CGI-OUTPUT-MODE] [BINARY]
[X-DIRECT-VERSION] [15.0.0]
====================END HTTP_KEYWORDS.TXT ===============================================
=========================== START TRANSPORT.TXT =======================
=================== TRACE OPEN ===================
manager: version : 15.0
manager: date : 2023-08-24 13:46:38 -0500
client thread: command and transport tracing has been activated
client thread: client address : 127.0.0.1
client thread: prepare trace time : 9 ms
client thread: prepare service time : 1 ms
client thread: call service command
client thread: time spent executing service command : 4 ms
transport: send response
transport: (send application/response)
output buffer: Content-Type: application/response
output buffer: Status-Length: 2
output buffer: Message-Length: 27
output buffer: ByteArray-Length: 0
output buffer: Field-Count: 0
output buffer: FieldData-Length: 0
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
output buffer:
output buffer: 2 bytes
output buffer: 27 bytes
output buffer: 0 bytes
transport: (send application/response) completed : 0 ms
client thread: (execute command) completed : 14 ms
client thread: read command
transport: read protocol
transport: Client-Type : iSeries
transport: Client-Version : 14.1.0
transport: Client-CodePage : 37
transport: Client-Language : ENU
transport: Client-Country : US
transport: Content-Type : application/command
transport: Protocol-Version : 1.0
transport: Status-Length : 20
transport: Message-Length : 256
transport: Client-Length : 88
transport: Command-Length : 79
transport: ByteArray-Length : 0
transport: List-Length : 0
transport: ListEntry-Count : 0
transport: ListEntry-MaxCount : 50
transport: ListEntry-Length : 130
transport: Field-Count : 11
transport: FieldList-Length : 165
transport: FieldData-Length : 768
transport: KeywordList-Length : 0
transport: HTTP-Context : connect
transport: read protocol completed
transport: (build application/command object)
transport: read byte stream components
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
transport: create client object
transport: create http keyword list object
transport: create field list object
transport: create list object
transport: create command object
transport: create list definition : REQ_NAME, REQ_VALUE
transport: initialize list, max entry: 50, entry count: 0
transport: command object : RECEIVE SERVICE_LIST(REQ_NAME, REQ_VALUE) BIND(*LIST) HANDLER(INBOUNDNAMEVALUE)
transport: (build application/command object) completed : 1 ms
client thread: read command completed
client thread: (execute command)
client thread: call service command
client thread: time spent executing service command : 0 ms
transport: send response
transport: (send application/response)
output buffer: Content-Type: application/response
output buffer: Status-Length: 2
output buffer: Message-Length: 0
output buffer: ByteArray-Length: 0
output buffer: Field-Count: 0
output buffer: FieldData-Length: 0
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
output buffer:
output buffer: 2 bytes
output buffer: 0 bytes
output buffer: 0 bytes
transport: (send application/response) completed : 0 ms
client thread: (execute command) completed : 0 ms
client thread: read command
transport: read protocol
transport: Client-Type : iSeries
transport: Client-Version : 14.1.0
transport: Client-CodePage : 37
transport: Client-Language : ENU
transport: Client-Country : US
transport: Content-Type : application/command
transport: Protocol-Version : 1.0
transport: Status-Length : 20
transport: Message-Length : 256
transport: Client-Length : 88
transport: Command-Length : 28
transport: ByteArray-Length : 0
transport: List-Length : 0
transport: ListEntry-Count : 0
transport: ListEntry-MaxCount : 0
transport: ListEntry-Length : 0
transport: Field-Count : 0
transport: FieldList-Length : 0
transport: FieldData-Length : 0
transport: KeywordList-Length : 0
transport: HTTP-Context : connect
transport: read protocol completed
transport: (build application/command object)
transport: read byte stream components
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
transport: create client object
transport: create http keyword list object
transport: create command object
transport: command object : GET PROPERTY(REMOTE-ADDRESS)
transport: (build application/command object) completed : 0 ms
client thread: read command completed
client thread: (execute command)
client thread: call service command
client thread: time spent executing service command : 0 ms
transport: send response
transport: (send application/response)
output buffer: Content-Type: application/response
output buffer: Status-Length: 2
output buffer: Message-Length: 13
output buffer: ByteArray-Length: 0
output buffer: Field-Count: 0
output buffer: FieldData-Length: 0
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
output buffer:
output buffer: 2 bytes
output buffer: 13 bytes
output buffer: 0 bytes
transport: (send application/response) completed : 0 ms
client thread: (execute command) completed : 1 ms
client thread: read command
transport: read protocol
transport: Client-Type : iSeries
transport: Client-Version : 14.1.0
transport: Client-CodePage : 37
transport: Client-Language : ENU
transport: Client-Country : US
transport: Content-Type : application/command
transport: Protocol-Version : 1.0
transport: Status-Length : 20
transport: Message-Length : 256
transport: Client-Length : 88
transport: Command-Length : 165
transport: ByteArray-Length : 0
transport: List-Length : 0
transport: ListEntry-Count : 0
transport: ListEntry-MaxCount : 0
transport: ListEntry-Length : 0
transport: Field-Count : 0
transport: FieldList-Length : 0
transport: FieldData-Length : 0
transport: KeywordList-Length : 0
transport: HTTP-Context : connect
transport: read protocol completed
transport: (build application/command object)
transport: read byte stream components
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
transport: create client object
transport: create http keyword list object
transport: create command object
transport: command object : SEND HANDLER(INBOUNDFILE) CONTENT(*TEXTPLAIN) FILE(/temp/WebServiceError_004926.txt) MESSAGE(Invalid Company Control V14 Development; has to be a number) STATUS(400)
transport: (build application/command object) completed : 1 ms
client thread: read command completed
client thread: (execute command)
client thread: call service command
client thread: time spent executing service command : 4 ms
transport: send response
transport: (send application/response)
output buffer: Content-Type: application/response
output buffer: Status-Length: 2
output buffer: Message-Length: 0
output buffer: ByteArray-Length: 303
output buffer: Field-Count: 0
output buffer: FieldData-Length: 0
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
output buffer:
output buffer: 2 bytes
output buffer: 0 bytes
output buffer: 303 bytes
transport: (send application/response) completed : 1 ms
client thread: (execute command) completed : 5 ms
client thread: read command
transport: read protocol
transport: Client-Type : iSeries
transport: Client-Version : 14.1.0
transport: Client-CodePage : 37
transport: Client-Language : ENU
transport: Client-Country : US
transport: Content-Type : application/command
transport: Protocol-Version : 1.0
transport: Status-Length : 20
transport: Message-Length : 256
transport: Client-Length : 88
transport: Command-Length : 13
transport: ByteArray-Length : 0
transport: List-Length : 0
transport: ListEntry-Count : 0
transport: ListEntry-MaxCount : 0
transport: ListEntry-Length : 0
transport: Field-Count : 0
transport: FieldList-Length : 0
transport: FieldData-Length : 0
transport: KeywordList-Length : 0
transport: HTTP-Context : connect
transport: read protocol completed
transport: (build application/command object)
transport: read byte stream components
input buffer: read data block
input buffer: read data block completed : 0 ms
input buffer: read data block
input buffer: read data block completed : 0 ms
transport: create client object
transport: create http keyword list object
transport: create command object
transport: command object : SERVICE_CLOSE
transport: (build application/command object) completed : 1 ms
client thread: read command completed
client thread: (execute command)
transport: send response
transport: (send application/response)
output buffer: Content-Type: application/response
output buffer: Status-Length: 2
output buffer: Message-Length: 27
output buffer: ByteArray-Length: 0
output buffer: Field-Count: 0
output buffer: FieldData-Length: 0
output buffer: List-Length: 0
output buffer: ListEntry-Count: 0
output buffer: ListEntry-Length: 0
output buffer:
output buffer: 2 bytes
output buffer: 27 bytes
output buffer: 0 bytes
transport: (send application/response) completed : 0 ms
client thread: (execute command) completed : 0 ms
client thread: total thread time : 38 ms
=================== TRACE CLOSE ==================
=========================== END TRANSPORT.TXT =======================
==================== START HTTP_RESPONSE_CONTENT.txt ==============================
400 - Invalid Company Control V14 Development; has to be a number
====================END HTTP_RESPONSE_CONTENT.txt ==============================
==================== START HTTP_RESPONSE_PROTOCOL.txt ==============================
Status: 400 Invalid Company Control V14 Development; has to be a number
Connection: close
Content-Type: text/plain; charset=utf-8
Content-Length: 65
Cache-Control: max-age=0, s-maxage=0, must-revalidate, proxy-revalidate, no-cache
====================END HTTP_RESPONSE_CONTENT.txt ==============================
====================END HTTP_RESPONSE_PROTOCOL.txt ==============================