(RPG) How to deploy internal website via WebView
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
(RPG) How to deploy internal website via WebView
OK, so I'm not a web expert (far from it)....
I can use LongRange Studio to create a schema that has a menu option with a target of a Web View, and set the Startup URL, and this works just fine when the URL points to a public website. What I'd like to do is to have the URL point to an internal (behind the firewall) website, to have that website deployed as a mobile app, but this website is not coming up. The internal website is hosted on an IIS server.
Any suggestions?
TIA.
JJ
I can use LongRange Studio to create a schema that has a menu option with a target of a Web View, and set the Startup URL, and this works just fine when the URL points to a public website. What I'd like to do is to have the URL point to an internal (behind the firewall) website, to have that website deployed as a mobile app, but this website is not coming up. The internal website is hosted on an IIS server.
Any suggestions?
TIA.
JJ
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) How to deploy internal website via WebView
The web view is an iOS web browser instance.
At first pass I would say that if you cannot access it via Safari on the device you will not be able to access it via the LongRange Webview.
However – this needs some more thought and maybe some others will have ideas.
What type of server(s) is the internal web site hosted on?
What type of stuff is on the web server (eg: ranges from fully transactional HTML pages to simple static HTML and PDF documents)?
Is the fact that it is internal is just about security – there are no technical restrictions or limitations to exposing it via a reverse proxy server (say) or via a VPN (say)?
At first pass I would say that if you cannot access it via Safari on the device you will not be able to access it via the LongRange Webview.
However – this needs some more thought and maybe some others will have ideas.
What type of server(s) is the internal web site hosted on?
What type of stuff is on the web server (eg: ranges from fully transactional HTML pages to simple static HTML and PDF documents)?
Is the fact that it is internal is just about security – there are no technical restrictions or limitations to exposing it via a reverse proxy server (say) or via a VPN (say)?
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
Re: (RPG) How to deploy internal website via WebView
Mark,
The site currently sits behind our firewall due to security: we don't want others outside our company to see it. It is hosted on an IIS server.
What I'd like to have happen is that once a user has signed on to our mobile app, they then have access to all of the information in our company dashboard, out in the field via the mobile app, that they currently have access to when signed in to the VPN locally.
The type of stuff on the site is typically dashboard-type reports generated by the WebFocus tool: specifically we want to expose the 'Deliveries' report (attached).
Thanks.
JJ
The site currently sits behind our firewall due to security: we don't want others outside our company to see it. It is hosted on an IIS server.
What I'd like to have happen is that once a user has signed on to our mobile app, they then have access to all of the information in our company dashboard, out in the field via the mobile app, that they currently have access to when signed in to the VPN locally.
The type of stuff on the site is typically dashboard-type reports generated by the WebFocus tool: specifically we want to expose the 'Deliveries' report (attached).
Thanks.
JJ
- Attachments
-
- Web Deliveries.jpg (257.48 KiB) Viewed 7552 times
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) How to deploy internal website via WebView
If you define the VPN on the iOS or Android device can you access the web server resource from outside the wall?
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
Re: (RPG) How to deploy internal website via WebView
Yes, if the users sign on to the VPN they can get to the site from outside the firewall, but that's what we're trying to avoid.
They have access to this data today via VPN from their mobile devices, but they have to sign on to the VPN first, which is inconvenient for them.
For my LongRange apps, I've created an auto-signon feature that remembers the last signed on user ID and password for a given device GUID, and will automatically sign them on, so all they have to do is bring up the app and the information is displayed to them, without them having to key in their user ID and password.
We'd like to be able to use this feature to deploy the Deliveries report to their mobile devices, but the report is behind the firewall.
TIA
JJ
They have access to this data today via VPN from their mobile devices, but they have to sign on to the VPN first, which is inconvenient for them.
For my LongRange apps, I've created an auto-signon feature that remembers the last signed on user ID and password for a given device GUID, and will automatically sign them on, so all they have to do is bring up the app and the information is displayed to them, without them having to key in their user ID and password.
We'd like to be able to use this feature to deploy the Deliveries report to their mobile devices, but the report is behind the firewall.
TIA
JJ
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) How to deploy internal website via WebView
Are the web pages static or dynamic?
-
JohnJoiner
- Posts: 37
- Joined: Fri Oct 19, 2012 8:48 am
Re: (RPG) How to deploy internal website via WebView
Good morning (I guess it's tomorrow morning there!).
The web pages (reports) are created dynamically from WebFocus, and are "refreshed" each minute
JJ
The web pages (reports) are created dynamically from WebFocus, and are "refreshed" each minute
JJ
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) How to deploy internal website via WebView
The only options I can think of (and I am no web browser/server expert):
-> VPN access.
-> Reverse proxy server. Routes all requests through a well-defined hole in the firewall + add normal web server authentication protection. Allow only specified URL requests to come through the firewall hole. Users never see or know the real IP address – they just deal with the proxy address.
-> Imbed your views inside an RPG program. This gives you more secure and more flexible control over the URLs the user access. You might also offer RPG based data set selection to make it easier/quicker for users.
-> VPN access.
-> Reverse proxy server. Routes all requests through a well-defined hole in the firewall + add normal web server authentication protection. Allow only specified URL requests to come through the firewall hole. Users never see or know the real IP address – they just deal with the proxy address.
-> Imbed your views inside an RPG program. This gives you more secure and more flexible control over the URLs the user access. You might also offer RPG based data set selection to make it easier/quicker for users.
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RPG) How to deploy internal website via WebView
The only other option I can think of is an RPG program with an imbedded web view.
The web view content can be filled programmatically by the RPG program. If you have the latest RV11 server installed you can see this in the Advanced Web View examples. The examples read the HTML pages that are delivered to the client web browser from source file members stored on the IBM server (eg: look at LRNG_DEMO/SOURCEEXAM EXAM0086W).
So the RPG programs are delivering HTML/JavaScript to the client without going through a web server in the normal way. In effect the RPG program is acting like a very simple web server.
EXAM0087 (RPG) and EXAM0087W (HTML/JavaScript) in LRNG_DEMO/SOURCEEXAM demonstrate this most simply.
If the RPG program can deliver the HTML/JavaScript page to the browser then (in theory) it could obtain the HTML/JavaScript from anywhere.
So maybe it could open a socket to the IIS Windows server, read the returned data and deliver it back to the LR client? Or it might be able to use a mapped drive via the QFileSRV.400 thing - so that the RPG program can read HTML pages directly folders on the Windows server?
The biggest hurdle is probably that most HTML pages contain imbedded requests to access other resources (images, style sheets, scripting, etc, etc) – and those requests would need to go through a real web server.
PS: If ever decide to try out the RPG sockets approach I would love to see the code. It would be very interesting.
The web view content can be filled programmatically by the RPG program. If you have the latest RV11 server installed you can see this in the Advanced Web View examples. The examples read the HTML pages that are delivered to the client web browser from source file members stored on the IBM server (eg: look at LRNG_DEMO/SOURCEEXAM EXAM0086W).
So the RPG programs are delivering HTML/JavaScript to the client without going through a web server in the normal way. In effect the RPG program is acting like a very simple web server.
EXAM0087 (RPG) and EXAM0087W (HTML/JavaScript) in LRNG_DEMO/SOURCEEXAM demonstrate this most simply.
If the RPG program can deliver the HTML/JavaScript page to the browser then (in theory) it could obtain the HTML/JavaScript from anywhere.
So maybe it could open a socket to the IIS Windows server, read the returned data and deliver it back to the LR client? Or it might be able to use a mapped drive via the QFileSRV.400 thing - so that the RPG program can read HTML pages directly folders on the Windows server?
The biggest hurdle is probably that most HTML pages contain imbedded requests to access other resources (images, style sheets, scripting, etc, etc) – and those requests would need to go through a real web server.
PS: If ever decide to try out the RPG sockets approach I would love to see the code. It would be very interesting.
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am