Thank for replying
I uses python and the httplib library and not cURL and this is what I did.
This is what I use the setup wms store. This got this part by imitating the xml
that create datastore from postgis. Creating wms store. This will create a wms
store
XML
<wmsStore>
<name>aWMSstore</name>
<type>WMS</type>
<enabled>true</enabled>
<capabilitiesURL>http://demo.opengeo.org/geoserver/wms
?request=GetCapabilites</capabilitiesURL>
<user>username</user>
<password>password</password>
<metadata>
<entry key="useConnectionPooling">true</entry>
</metadata>
<maxConnections>6</maxConnections>
<connectTimeout>30</connectTimeout>
<readTimeout>60</readTimeout>
</wmsStore>
the REST url using http POST method
http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores.xml
Now, this is what I did to create wms layer. This didn't work
XML
<wmsLayer>
<name>states</name>
<nativeName>states</nativeName>
<enabled>true</enabled>
<nativeCRS>EPSG:4326</nativeCRS>
<srs>EPSG:4326</srs>
<projectionPolicy>FORCE_DECLARED</projectionPolicy>
<keywords>
<string>states</string>
<string>features</string>
</keywords>
</wmsLayer>
the REST url using http POST method
http://localhost:8080/geoserver/rest/workspaces/topp/wmsstores/aWMSstore/wmslayers.xml
This is exactly what I did. Pretty standard. Hope you have better luck than me.
Allen
On Saturday, September 6, 2014 1:27 AM, Rahkonen Jukka (Tike)
<[email protected]> wrote:
Hi,
I don't know if there are special limitations for WMS stores in REST or not but
you can read this Stackexchange question
http://gis.stackexchange.com/questions/112599/geoserver-datastore-property-update-via-rest-api/112612#112612.
Use it as an example and send us the complete REST requests which you used so
that we can repeat everything by copy-paste. Use localhost:8080 as host and
http://demo.opengeo.org/geoserver/wms as WMS and topp:states as layer to
cascade.
-Jukka Rahkonen-
________________________________
Allen Huang wrote:
> Is there a rest api for wmsstore or wmslayer? I don't think there is a page
> for it in the Geoserver documentation. I thought it would work the same as
> normal stores and featuretype/coverages and I was able to add a wmsstore with
> xml but that's it. Can't modify or delete wmsstore or even add wmslayer.
Allen------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users