Page 1 of 1

retrieving the host and port from a session definition

Posted: Tue Apr 08, 2014 6:58 am
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?

Re: retrieving the host and port from a session definition

Posted: Tue Apr 08, 2014 7:56 am
by MarkDuignan
RPG or RDMLX customer?

Re: retrieving the host and port from a session definition

Posted: Tue Apr 08, 2014 8:35 am
by dhnaigles
RDMLX

Re: retrieving the host and port from a session definition

Posted: Tue May 13, 2014 6:33 am
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.

Re: retrieving the host and port from a session definition

Posted: Wed May 14, 2014 9:29 am
by tsupartono
Yes this is done in RV16 - out to be released in a week or so.

Re: retrieving the host and port from a session definition

Posted: Wed May 14, 2014 9:41 am
by stevec
Thank u

Re: retrieving the host and port from a session definition

Posted: Fri May 23, 2014 1:58 am
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 ...

Re: retrieving the host and port from a session definition

Posted: Mon May 26, 2014 9:48 am
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

Re: retrieving the host and port from a session definition

Posted: Wed May 28, 2014 7:07 am
by stevec
The slash "/" for relative to webserver directory also worked for set_webview