Web Map Server Application

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Web Map Server Application

Postby Robert Huber » Sun Sep 26, 2010 10:04 pm

Hi All

I am wondering if someone is doing or has done a Servoy application with a Map Server? I am especially interested in the QGIS mapserver, developed at the ETH (Swiss Federal institute of Technology Zurich). This Web Map Server will be part of the QGIS Version 1.6. This is all based on the PostgreSQL/PostGIS database.
Other technologies involved are Web Map Services (WMS), http://en.wikipedia.org/wiki/Web_Map_Service
and Web Feature Service (WFS), http://en.wikipedia.org/wiki/Web_Feature_Service
all specifications are from the Open Geospatial Consortium, http://en.wikipedia.org/wiki/Open_Geospatial_Consortium

I would very appreciate to hear if anybody is involved in such a project.

Also, is anyone may be experimenting with Sybase 12 (spatial) and Web Map Servers?

Thanks and regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby Robert Huber » Tue Sep 28, 2010 11:21 am

Hi All

Really nobody in Servoy world working in such an environment?

I also try to figure out IF we could use Servoy for such a work at all or if it is not suitable.

The Servoy Wiki notes in the deployment architecture picture in

http://wiki.servoy.com/display/Serv51/S ... chitecture

about web services (bottom box left side). Where are these services located in the file system?

We will use at least Web Map Service (WMS) and Web Feature Service (WFS). These are obviously web services. Can I link them somehow with the web services existing in the diagram?

I should have more detailed information about how the diagram parts are built up in more detail and are accessable by developers.

Servoy, is there somewhere more detailed information about the architecture?

Regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby ptalbot » Tue Sep 28, 2010 2:19 pm

Hi Robert,

the web services in the architecture diagram are really the web services that Servoy provide.
Meaning that Servoy can act as a server for web services client.

What you are looking for is having Servoy act as client of web services provided by GIS servers.
Not the same thing at all.

Not to do that, there are 2 options:
1/ IF the web services in question are using simple types (booleans, numbers, dates, strings), you can use the http plugin to connect to them and get an xml result.
2/ IF the web services you want to use are expecting and returning complex types (most of them are nowadays), then you will have to create a plugin that will (probably with the help of the Apache Axis library or with Jaxb or Jaxws) to communicate with these services.

To figure out if theses services are using simple types or complex type you will have to have a look at their wsdl (definition file ot the service).

Hope this helps,
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Web Map Server Application

Postby Robert Huber » Wed Sep 29, 2010 10:03 am

Hi Patrick

ptalbot wrote:Hi Robert,

the web services in the architecture diagram are really the web services that Servoy provide.
Meaning that Servoy can act as a server for web services client.

What you are looking for is having Servoy act as client of web services provided by GIS servers.
Not the same thing at all.

Hmmm, not sure what you mean by this differentiation and I am also not sure if I understand it correctly. You make a differentiation between "web services that Servoy" provide and "web services that GIS servers" provide.
What I mean, i. e. we would like to do is program web applications based not only on a standard web server, which can't handle maps, except if a map is an (complete) image.

To handle maps in a sense that a client (the browser) can ask for capabilities of a georeferenced map, or ask for certain layers of the map, including info like what projection (e. g. WGS84) is used etc. an (OGC) map server is needed.

For this purpose, the Open Geospatial Consortium (OGC) became involved in developing standards for web mapping after a paper was published in 1997 by Allan Doyle, outlining a "WWW Mapping Framework". See aforementioned links.

To do this, there is a so called map server needed, which works as an extention of a standard web server like apache. So I am asking myself if the architecture of Servoy in general would allow such a setup or not? And, of course, if it does, where to put the map server (therefor the hint to the web services box in the architecture diagram). The maps, if not directly called from within a database, are stored in the fcgi-bin folder (fcgi -> fastCGI).

I would very much appreciate if Servoy could tell me if they thought about using Servoy for such a task or if this completely out of bounds?

ptalbot wrote:Not to do that, there are 2 options:
1/ IF the web services in question are using simple types (booleans, numbers, dates, strings), you can use the http plugin to connect to them and get an xml result.
2/ IF the web services you want to use are expecting and returning complex types (most of them are nowadays), then you will have to create a plugin that will (probably with the help of the Apache Axis library or with Jaxb or Jaxws) to communicate with these services.

To figure out if theses services are using simple types or complex type you will have to have a look at their wsdl (definition file ot the service).

Hope this helps,


An OGC conform wms map server returns as a result for example of a getCapabilities() method an XML document, or for a getMap() method a georeferenced raster image to the client.

But, as said above, I try to find out if such an application could be useful developed with Servoy. And, to do the deployement later on, it has to be able to support an (OGC) map server as mentioned above.

Is there some detailed info about how the Servoy app server (a customized version of Tomcat if I understood correctly) interacts with the web server (apache) for a web client?

Best regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby jcompagner » Wed Sep 29, 2010 3:49 pm

patrick explained it pretty well in my eyes

what you want is to be a consumer of a webservices,
Servoy by itself is only a producer of a webservices (servoy is the webservice)

For consuming webservices there are a few options, like a generic plugin that handles it for you (most these only work for simple webservices that dont provide complex types)
you can program it out yourself through the http plugin (hopefully you have everything you need, we are in the process of making the http plugin beter suited for this)

Or make your own java plugin (by using for example axis) where you do all the interaction with your service and then have calls/callbacks to that plugin from scripting.

Edit: or do you just want to run an web application inside tomcat that servoy ships that is that webservices? That is also possible, just drop the WAR in our tomcat webapps dir. But thats all that servoy can do.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Web Map Server Application

Postby Robert Huber » Wed Sep 29, 2010 5:23 pm

Hi Johann

I am looking for both. I am trying to find out if Servoy could act as a WebServer/MapServer, instead of "only" a WebServer. The Web Services it should be able to produce is the MApServer, in cooperation with the WebServer. The primary service it should handle is the Web Map Service and Web Feature Service. I assume it just should be possible to link the MapServer with the WebServer in the corresponding directory. Which would that be if it were possible?

The second requirement I am looking for is if Servoy could be used as a development platform for such a web map application? I assume this is only useful possible if the first requirement is fullfilled, i. e. I am able to set up a Servoy based Web/MapServer. If this is not possible, I don't know how I could develop, test and debug a web map application?

Is it a bit more clear now what we would like to accomplish?

Of course I am very interested in answers or hints to the above questions.

I also assume, because no one seems to have a straight answer, we are the first trying to set up a MapServer with Servoy?

Regards, Robert

jcompagner wrote:patrick explained it pretty well in my eyes

what you want is to be a consumer of a webservices,
Servoy by itself is only a producer of a webservices (servoy is the webservice)

For consuming webservices there are a few options, like a generic plugin that handles it for you (most these only work for simple webservices that dont provide complex types)
you can program it out yourself through the http plugin (hopefully you have everything you need, we are in the process of making the http plugin beter suited for this)

Or make your own java plugin (by using for example axis) where you do all the interaction with your service and then have calls/callbacks to that plugin from scripting.

Edit: or do you just want to run an web application inside tomcat that servoy ships that is that webservices? That is also possible, just drop the WAR in our tomcat webapps dir. But thats all that servoy can do.
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby jcompagner » Wed Sep 29, 2010 5:32 pm

as i said, you could reuse the tomcat app server for this that we have in servoy
for the rest i dont see anything servoy could provide.
its just a separate web application that you want to have besides servoy in tomcat.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Web Map Server Application

Postby ptalbot » Wed Sep 29, 2010 5:41 pm

Hi Robert,

as you said yourself:
Robert Huber wrote:To do this, there is a so called map server needed, which works as an extention of a standard web server like apache.


The problem is that you seem to confuse the Apache Http server (which has that so called extension) with Apache Tomcat, which is the one Servoy is based on.
Apache Http server is a web server, while Tomcat is a Java Application server.

So, if you were to install a Map server, you would have to install it on Apache Http server, then use it as a frontal server to the Servoy server (using ajp/mod_jk extension protocol). I don't know if such extension (that would be a war probably) exists for Tomcat, you would have to search for Tomcat/Map server, I suppose.

In the end, you are probably right that no one ever used Servoy as a Map server, but this would be because this is not were you would install your Map server.
Once you got your Map server installed on Apache, nothing prevents you from communicating with its web services with Servoy using the http plugin or building your own specialized plugin.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Web Map Server Application

Postby Robert Huber » Wed Sep 29, 2010 6:19 pm

Hi Patrick

What you say is exactly what I am trying to find out. As far as I understand (please correct me):
- Servoy has a SmartClient (Java), which is served by the Apache Tomcat
- Servoy has a WebClient (Browser), which ist served by ???

Wikipedia says that although Tomcat has a complete HTTP Server, usually a web server is used for web clients which is in front of the Tomcat, connect via themod_jk connector-plug-in. The HTTP Server in Tomcat is only used for development purposes.
Is this description true for Servoy. Do they use the apache web server (with the mod_jk connector plug-in in front of Tomcat to serve web clients?

And where is the Servoy application code (web client) to be put, for the WebServer to access it and send it to the client?

If this is true, I could set up the apache web server with the map server an web clients could request maps beside the standard logic we would like to program in Servoy. I just don't get it if my picture is right?
The problem is, that the maps (layers, projections, tiles, ...) are obviously not created within Servoy, but are created (in our case) from a GIS System like Quantum GIS and have to be put for example into the fcgi-bin folder.
How do this 2 code parts (Servoy code and maps) come together if a web client makes a request?

So the question remains can I somehow configure with whatever parts a Servoy App/Web Server with a MapServer to serve for web clients not only requesting standard Servoy functionality, but as well functionality delivered by a map server.

ptalbot wrote:Hi Robert,

as you said yourself:
Robert Huber wrote:To do this, there is a so called map server needed, which works as an extention of a standard web server like apache.


The problem is that you seem to confuse the Apache Http server (which has that so called extension) with Apache Tomcat, which is the one Servoy is based on.
Apache Http server is a web server, while Tomcat is a Java Application server.


I would do as you propose, i. e. install the map server in the apache web server, if I see a chance that this is coming to fly. But I am thinking not only to use the http plug-in of Servoy but to create a whole Web application with all the bells and whistles offered by Servoy.

ptalbot wrote:So, if you were to install a Map server, you would have to install it on Apache Http server, then use it as a frontal server to the Servoy server (using ajp/mod_jk extension protocol). I don't know if such extension (that would be a war probably) exists for Tomcat, you would have to search for Tomcat/Map server, I suppose.

In the end, you are probably right that no one ever used Servoy as a Map server, but this would be because this is not were you would install your Map server.
Once you got your Map server installed on Apache, nothing prevents you from communicating with its web services with Servoy using the http plugin or building your own specialized plugin.


Regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby ptalbot » Wed Sep 29, 2010 6:47 pm

Robert Huber wrote:What you say is exactly what I am trying to find out. As far as I understand (please correct me):
- Servoy has a SmartClient (Java), which is served by the Apache Tomcat
- Servoy has a WebClient (Browser), which ist served by ???

The web client is also served by Tomcat in a regular Servoy install.
There are a few servlet entry points and the library used to render 'html' pages is Wicket.

Robert Huber wrote:Wikipedia says that although Tomcat has a complete HTTP Server, usually a web server is used for web clients which is in front of the Tomcat, connect via themod_jk connector-plug-in. The HTTP Server in Tomcat is only used for development purposes.
Is this description true for Servoy.

If Wikipedia says it, then it's true ;)
Seriously, Tomcat is usually not used as a pure static web server (for static resources like plain html pages or images), but in the case of Servoy it serves dynamic pages (created on the fly by the Wicket lib and Servoy's libs based on your solution) so it is perfectly normal.

Robert Huber wrote:Do they use the apache web server (with the mod_jk connector plug-in in front of Tomcat to serve web clients?

The standard Servoy install doesn't contain a frontal Apache Http server, but you can do that yourself, and then you will be able to serve static content (or php pages if you want, or cgi) as well as pass through any servoy requests to the Tomcat server.

Robert Huber wrote:And where is the Servoy application code (web client) to be put, for the WebServer to access it and send it to the client?

Where do you put it usually? In your solution, I suppose!

Robert Huber wrote:If this is true, I could set up the apache web server with the map server an web clients could request maps beside the standard logic we would like to program in Servoy. I just don't get it if my picture is right?

Yes, your picture's right.

Robert Huber wrote:The problem is, that the maps (layers, projections, tiles, ...) are obviously not created within Servoy, but are created (in our case) from a GIS System like Quantum GIS and have to be put for example into the fcgi-bin folder.
How do this 2 code parts (Servoy code and maps) come together if a web client makes a request?

So the question remains can I somehow configure with whatever parts a Servoy App/Web Server with a MapServer to serve for web clients not only requesting standard Servoy functionality, but as well functionality delivered by a map server.

You would setup your MapServer on the frontal Apache Http server, following what is required in Apache Http.
Then in Servoy you could use the http plugin to query the Apache Http server for a map, get the response and put that in a field of type HTML_AREA.
You could also use the BrowserSuite ServoyBrowser if your solution is for Smart clients.
What would be crucial would be the configuration of the Apache Http server so that depending on the request, the Map cgi would respond or the Servoy server would respond.

Robert Huber wrote:I would do as you propose, i. e. install the map server in the apache web server, if I see a chance that this is coming to fly. But I am thinking not only to use the http plug-in of Servoy but to create a whole Web application with all the bells and whistles offered by Servoy.

You can certainly do that.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Web Map Server Application

Postby Robert Huber » Wed Sep 29, 2010 7:50 pm

Hi Patrick

Thanks very much for your answers, my picture is getting much clearer :-)

I am also glad to know now that Servoy is using the HTTP Server within Tomcat for the web client. I was never actually sure about how it works.

As you say the crucial part is the configuration of the Apache HTTP server so that depending on the request, the Apache HTTP server or the Servoy app server has to respond, may be Servoy has a hint how to accomplish such a situation.

As next, I only have to get up a map server .-)

Thanks and regards, Robert

ptalbot wrote:
Robert Huber wrote:The problem is, that the maps (layers, projections, tiles, ...) are obviously not created within Servoy, but are created (in our case) from a GIS System like Quantum GIS and have to be put for example into the fcgi-bin folder.
How do this 2 code parts (Servoy code and maps) come together if a web client makes a request?

So the question remains can I somehow configure with whatever parts a Servoy App/Web Server with a MapServer to serve for web clients not only requesting standard Servoy functionality, but as well functionality delivered by a map server.

You would setup your MapServer on the frontal Apache Http server, following what is required in Apache Http.
Then in Servoy you could use the http plugin to query the Apache Http server for a map, get the response and put that in a field of type HTML_AREA.
You could also use the BrowserSuite ServoyBrowser if your solution is for Smart clients.
What would be crucial would be the configuration of the Apache Http server so that depending on the request, the Map cgi would respond or the Servoy server would respond.
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby Robert Huber » Wed Sep 29, 2010 7:54 pm

jcompagner wrote:as i said, you could reuse the tomcat app server for this that we have in servoy


Sounds good, I only have the little problem to find out how :-?

jcompagner wrote:for the rest i dont see anything servoy could provide.


But still I would like to use Servoy for all the application except showing the maps :-)

jcompagner wrote:its just a separate web application that you want to have besides servoy in tomcat.


Heahh, for you it may be just beside, but I have to translate "beside" in something workable - may be I am wrong, but it doesn't seem to be like 2 lines of code, otherwise please show them to me if it's just that ... so I could finish this evening .-)

Thanks and regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: Web Map Server Application

Postby pbakker » Thu Sep 30, 2010 9:23 am

Hi Robert,

Following the entire thread, it seems to me you want to present your user with a Servoy Web Client based solution, in which a Map is displayed, right?

In that case, you don't have to do any integration between Apache HTTPD Server and Servoy 's Apache TomCat etc. You can just show the map in a IFrame tag (HTML) inside an HTML Area (Servoy).

As for how to install another Web App into Servoy's Apache Tomcat: depends on how the webapp you want to add is offered to you, but usually they come in .WAR files, which you just drop into ../application_server/server/webapps, after which they install themselves. This whole process of installing webapps into an existing TomCat instance is nothing specific to Servoy, so if you like to know more, it's best to find info about how to do this in Tomcat on the Tomcat website: http://tomcat.apache.org/

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Web Map Server Application

Postby Robert Huber » Thu Sep 30, 2010 10:09 am

Hi Paul

pbakker wrote:Hi Robert,

Following the entire thread, it seems to me you want to present your user with a Servoy Web Client based solution, in which a Map is displayed, right?


That's right, I want to check out for one of our customers possible future project (obvious which one .-) if we are able to produce with our Servoy knowledge and map knowledge a Servoy Web Client based solution. The displaying of the map is not sending a complete map image to the Web Client, but to use a Map Server to be able to react to requests based on the WMS and WFS specifications of the Open Geospatial Consortium (OGC).

pbakker wrote:In that case, you don't have to do any integration between Apache HTTPD Server and Servoy 's Apache TomCat etc. You can just show the map in a IFrame tag (HTML) inside an HTML Area (Servoy).


I don't think so. May be you think of a map as one image. That's not the case. A map in the above mentioned environment is composed of individual layers, information to projections of each layer, and so on. So you may not think of a map as a single image which is sent to the Web Client, it's a complete other beast.
We have to be able to "plug-in" a Map Server into a Servoy Environment (for development AND deployment), so that client request are either handled by the Servoy Web App or the Map Server.

pbakker wrote:As for how to install another Web App into Servoy's Apache Tomcat: depends on how the webapp you want to add is offered to you, but usually they come in .WAR files, which you just drop into ../application_server/server/webapps, after which they install themselves. This whole process of installing webapps into an existing TomCat instance is nothing specific to Servoy, so if you like to know more, it's best to find info about how to do this in Tomcat on the Tomcat website: http://tomcat.apache.org/

Paul


Thanks for help, will follow your URL to get more info about Tomcat and how to bind .war files to Tomcat.

Best regards, Robert
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland


Return to Web Development

Who is online

Users browsing this forum: No registered users and 9 guests