[Geoserver-users] GeoServer with GeoWebCache and external WMS sources

Ok, I’m baffled. Andrea wrote that you can use GWC to fetch wms services from multiple locations – but I’ll be darned if I can figure out how to do that.

I can easily fetch data from the geoserver that the GWC is “running” on, but if I try to specify a remote source, GWC says it does not know about that featuretype.

Example: I first tried setting GWC to pull the tiger-ny layer from the local geoserver, no problems. I then removed that featuretype on the local geoserver and pointed the URL to the remove geoserver. It then said it did not know about that featuretype.

Can someone please provide an example – I must be missing something here.

Thanks in advance,

Bryan

Hi Bryan,

for the GeoServer plugin version you can provide a configuration file with additional layers (manually defined), called geowebcache.xml [1,2]. In that file you specify the complete URL to the backend server for each layer, you can also have several backends for the same layer.

Unfortunately, there is a bug in GeoServer 1.7.3a which means you have to place this file into <geoserver webapp>/WEB-INF/classes/geowebcache.xml , normally it goes into <geoserver data dir>/gwc/geowebcache.xml . I hope to provide a fix for the latter on Monday.

For the free-standing version of GeoWebCache, you can also automatically fetch layers from two or more servers by editing geowebcache-servlet.xml [3]. What you have to do is dupliate (cutnpaste) the bean with id="gwcWMSConfig" (just name the new one gwcWMSConfig2) , and then add it in the bean with id="gwcTLDispatcher". Note that the server should not have layers with overlapping names, otherwise it's not really clear which one you'll end up getting.

Be sure have a look at the logs if you run into any problems.

-Arne

1: http://geowebcache.org/trac/wiki/configuration
2: http://geoserver.org/display/GEOSDOC/5.+GWC+-+GeoWebCache
3: http://geowebcache.org/trac/browser/tags/1.1.0/geowebcache/src/main/webapp/WEB-INF/geowebcache-servlet.xml

Hall, Bryan D Contr USAF AFMC 38 EIG/ENC wrote:

Ok, I’m baffled. Andrea wrote that you can use GWC to fetch wms services from multiple locations – but I’ll be darned if I can figure out how to do that.

I can easily fetch data from the geoserver that the GWC is “running” on, but if I try to specify a remote source, GWC says it does not know about that featuretype.

Example: I first tried setting GWC to pull the tiger-ny layer from the local geoserver, no problems. I then removed that featuretype on the local geoserver and pointed the URL to the remove geoserver. It then said it did not know about that featuretype.

Can someone please provide an example – I must be missing something here.

Thanks in advance,

Bryan

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers

Arne,

Thanks - that did it. Now I can keep more hair. :slight_smile:

Bryan

-----Original Message-----
From: Arne Kepp [mailto:ak@anonymised.com]
Sent: Saturday, April 04, 2009 7:32 AM
To: Hall, Bryan D Contr USAF AFMC 38 EIG/ENC
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GeoServer with GeoWebCache and external
WMS sources

Hi Bryan,

for the GeoServer plugin version you can provide a configuration file
with additional layers (manually defined), called geowebcache.xml [1,2].

In that file you specify the complete URL to the backend server for each

layer, you can also have several backends for the same layer.

Unfortunately, there is a bug in GeoServer 1.7.3a which means you have
to place this file into <geoserver
webapp>/WEB-INF/classes/geowebcache.xml , normally it goes into
<geoserver data dir>/gwc/geowebcache.xml . I hope to provide a fix for
the latter on Monday.

For the free-standing version of GeoWebCache, you can also automatically

fetch layers from two or more servers by editing geowebcache-servlet.xml

[3]. What you have to do is dupliate (cutnpaste) the bean with
id="gwcWMSConfig" (just name the new one gwcWMSConfig2) , and then add
it in the bean with id="gwcTLDispatcher". Note that the server should
not have layers with overlapping names, otherwise it's not really clear
which one you'll end up getting.

Be sure have a look at the logs if you run into any problems.

-Arne

1: http://geowebcache.org/trac/wiki/configuration
2: http://geoserver.org/display/GEOSDOC/5.+GWC+-+GeoWebCache
3:
http://geowebcache.org/trac/browser/tags/1.1.0/geowebcache/src/main/weba
pp/WEB-INF/geowebcache-servlet.xml

Hall, Bryan D Contr USAF AFMC 38 EIG/ENC wrote:

Ok, I'm baffled. Andrea wrote that you can use GWC to fetch wms
services from multiple locations - but I'll be darned if I can figure
out how to do that.

I can easily fetch data from the geoserver that the GWC is "running"
on, but if I try to specify a remote source, GWC says it does not know

about that featuretype.

Example: I first tried setting GWC to pull the tiger-ny layer from the

local geoserver, no problems. I then removed that featuretype on the
local geoserver and pointed the URL to the remove geoserver. It then
said it did not know about that featuretype.

Can someone please provide an example - I must be missing something

here.

Thanks in advance,

Bryan

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers