Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to add an External WMS layer to geoserver with a php page, using the REST service of Geoserver. I've already read the tutorials for creating the geoserver features (http://docs.geoserver.org/stable/en/user/restconfig/rest-config-api.html), but i couldn't find the way to create a new store and layer with an external wms service.

in other words: i have the url of the external wms service (=store), the layer i wanto to publish (=layer) and the epgs i want to use.

Is there a way to load all of these information in the geoserver schema?

Thank you.

share|improve this question

2 Answers 2

Unfortunately this is not documented in the api reference or samples. But here is the gist of it.

First create the store:

POST /rest/workspaces/<ws>/wmsstores


And then create the layers:

POST /rest/workspaces/<ws>/wmsstores/wms/wmslayers/

share|improve this answer
Thank you jdeolive for the answer, i'll try to implement this code in my php application. But, i can't figure out how could do that. Can you tell me with more details how can i add this POST code to a php page? Maybe this is a stupid question, but really, i can't figure how to use this REST commands with php –  Michele 2 Apr 17 '12 at 22:14
thank you jdeolive! it works! bye –  Michele 2 Apr 19 '12 at 11:28

You can also manually configure GeoServer for external WMS layers as explained here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.