retrieving the host and port from a session definition

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
dhnaigles
Posts: 28
Joined: Tue May 08, 2012 12:13 am

retrieving the host and port from a session definition

Post by dhnaigles »

We have an ISV who wants to discover the server host and port from the longrange mobile session definition. This host:port may be different for every customer and is the "prefix" to the WebView URL. Currently they are hard-coding this in the server-side code. Are there any methods to retrieve this information dynamically?
Regards,

David
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: retrieving the host and port from a session definition

Post by MarkDuignan »

RPG or RDMLX customer?
dhnaigles
Posts: 28
Joined: Tue May 08, 2012 12:13 am

Re: retrieving the host and port from a session definition

Post by dhnaigles »

RDMLX
Regards,

David
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: retrieving the host and port from a session definition

Post by stevec »

Is this going to be done?

If I can retrieve it then I would not have to hard code (or put in a data area or DB file) the port.

Even better would be ability to use relative path dot dot (..) like we can on Wams.
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: retrieving the host and port from a session definition

Post by tsupartono »

Yes this is done in RV16 - out to be released in a week or so.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: retrieving the host and port from a session definition

Post by stevec »

Thank u
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: retrieving the host and port from a session definition

Post by stevec »

I am not seeing where I can get server/port?

The R16 doc 2nd point in other enhance says can use relative path now which is what I really want for my pdf's

my request dot dot (..) like wams is not it ...
Mark_Dale
Posts: 61
Joined: Thu Apr 19, 2012 11:06 am

Re: retrieving the host and port from a session definition

Post by Mark_Dale »

My understanding of the relative URL rules are:


1. When using Open URL (#Com_Owner.Set_OpenURL)

a) start with / means relative to the WEBSERVER ROOT directory.

/images --> Http://myip:myport/images

b) start with nothing means relative to the LONGRANGE ROOT directory

resource/abacus.png --> http://myip:myport/images/Longrange/resource/abacus.png

c) or specify the full url

http://myip:myport/images/Longrange/resource/abacus.png



2. When defining a web view in the schema (as at RV16)

a) start with / means look for the local copy of a file in the Longrange/resource directory

/abacus.png --> http://myip:myport/images/Longrange/resource/abacus.png

b) start with ./ means relative to the LONGRANGE ROOT directory

./resource/abacus.png --> http://myip:myport/images/Longrange/resource/abacus.png

c) start with nothing means relative to the LONGRANGE ROOT directory

resource/abacus.png --> http://myip:myport/images/Longrange/resource/abacus.png

d) or specify the full url

http://myip:myport/images/Longrange/resource/abacus.png
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: retrieving the host and port from a session definition

Post by stevec »

The slash "/" for relative to webserver directory also worked for set_webview
Post Reply