LANSA Integrator inbound HTTP properties (java)

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
sam20UltraX1
Posts: 1
Joined: Tue Jul 27, 2021 4:54 am

LANSA Integrator inbound HTTP properties (java)

Post by sam20UltraX1 » Tue Jul 27, 2021 9:04 am

We have a custom java service called RFIDService that we use to process an inbound HTTP request thru JSMDirect. In the java we use the following routine to get the HTTP properties.

private final JSMResponse commandLOAD ( JSMCommand command ) throws Exception
{
// Keep possible HTTP properties from the SERVICE_LOAD command.
if ( m_trace != null )
{
httpFileOutputStream = new FileOutputStream ( m_trace.createTraceFile ( "HTTP_KEYWORDS.TXT" ) ) ;
}

httpProperties = new Hashtable<String,String> ( 20 ) ;

httpEnumeration = command.getKeywords () ;

while ( httpEnumeration.hasMoreElements() )
{
keyword = (String)httpEnumeration.nextElement () ;
value = command.getKeywordValue ( keyword ) ;

httpProperties.put ( keyword, value ) ;

if ( m_trace != null )
{
httpOutputContent = keyword.trim() + " = " + value.trim() + "\r\n" ;

httpFileOutputStream.write ( httpOutputContent.getBytes ( "UTF-8" ) ) ;
}
}
}

We have noticed that for LANSA v15 the HTTP keywords only contain the following

BIND = *FIELD
SERVICE_LIST = RFDNAME,RFDRESP
SERVICE = RFIDSERVICE
HTTP = *YES
TRACE = *YES

There seems to be another method to use to get the following

ACCEPT = text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
REMOTE-ADDRESS = 10.0.0.198
QUERY-STRING = RFDOBJECTSYNC+RFDEXEC(VERIFYTAGINFO)
SERVICE_LIST = RFDNAME,RFDRESP
HTTP = *YES
REMOTE-USER =
SERVER-SOFTWARE = Microsoft-IIS/8.5
SERVICE = RFIDSERVICE
SERVER-PROTOCOL = HTTP/1.1
REQUEST-METHOD = POST
CONTENT-TYPE = application/xml
USER-AGENT = Java/1.6.0_31
SERVER-PORT = 80
SERVER-NAME = 10.0.0.198
BIND = *FIELD
TRACE = *YES

So for LANSA v15, how do I retrieve the inbound HTTP headers and properties?

Post Reply