Hi!
I’ve got a GeoServer 2.5 deploy (2.5.1 but the behaviour seems the same with 2.5.2).
I have a layer and an associated style configured as part of a workspace. I also have global services enabled.
When I do a GetCapabilities request (for e.g. http://host:port/geoserver/wms?service=wms&version=1.3.0&request=getcapabilities) then the GetMap response contains…
···
<GetMap>
…
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xlink:href="[http://host:port/geoserver/ows?SERVICE=WMS&](http://host:port/geoserver/ows?SERVICE=WMS&)"/>
</Get>
</HTTP>
</DCPType>
</GetMap>
That is it returns the global OWS URL not the workspace URL.
The layer information looks like….
<Layer queryable="1" opaque="0">
<Name>my_layer</Name>
…
<Style>
<Name>my_style</Name>
…
</Style>
…
<Style>
<Name>point</Name>
…
</Style>
</Layer>
If I do a WMS request using the explicit workspace URL specifying the style to be my_style then everything works fine….
If however I use the global URL without the workspace as is returned from the GetCapabilities then it fails complaining that it can’t find the style…
<?xml version="1.0" encoding="UTF-8"?><ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://host:port/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"> <ServiceException code="StyleNotDefined">
No such style: my_style
</ServiceException></ServiceExceptionReport>
Omitting the style parameter works ok but not including it.
I have end-users who are constructing their GetMap URLs from the GetCapabilities and their requests are failing.
Am I missing something?
Thanks in advance!
Simon Oldfield
National Earth & Marine Observation Group | Environmental Geoscience Division | GEOSCIENCE AUSTRALIA
__________________________________________________****__________
Phone: +61 2 6249 9589 Fax: +61 2 6249 9999
Email: Simon.Oldfield@anonymised.com Web: www.ga.gov.au
Cnr Jerrabomberra Avenue and Hindmarsh Drive Symonston ACT
GPO Box 378 Canberra ACT 2601 Australia
Applying geoscience to Australia’s most important challenges