[Geoserver-devel] Blocking issue: WMS 1.3 exception handler serving all exceptions

Hi Justin,
I know that today you want to release a beta but I think I've found a blocking
issue: all service exceptions are being served by the WMS 1.3 exception handler
now.

For example, I make a request with a mis-spelled layer:
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:gant_polygon&styles=&bbox=-180.0,-90.0,180.0,90.0&width=660&height=330&srs=EPSG:4326&format=application/openlayers

(giant_polygon -> gant_polygon)

and I get back:

<ServiceExceptionReport version="1.3.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:8080/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd&quot;&gt;
<ServiceException code="LayerNotDefined">
      Could not find layer tiger:gant_polygon
</ServiceException>
</ServiceExceptionReport>

(with text/xml mime type).

Now, this is not what I'd expect from WMS 1.1, the mime type should be
the odd one
and the version 1.2, and using a different schema location.

Now, I looked a bit i the code and it seems there can be only one
exception handler per
service. WFS in fact has just one that does the right thing based on
the version specified
in the request:

if ("1.0.0".equals(request.getVersion())) {
            handle1_0(e, request.getHttpResponse());
        } else {
            super.handleServiceException(e, request);
        }

I guess the WMS one should be modified to follow suit.

Alternatively we should make service exception handlers version
specific, but that would
make for a bigger change

Opinions?

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

Cool, thanks for the heads up Andrea. I will fix this asap and write a test case for it.

I think for now the quick fix makes more sense and we just check the version but I agree it would be nice longer term to be able to attach an exception handler to a specific version of a service.

On Fri, Dec 17, 2010 at 8:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi Justin,
I know that today you want to release a beta but I think I’ve found a blocking
issue: all service exceptions are being served by the WMS 1.3 exception handler
now.

For example, I make a request with a mis-spelled layer:
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:gant_polygon&styles=&bbox=-180.0,-90.0,180.0,90.0&width=660&height=330&srs=EPSG:4326&format=application/openlayers

(giant_polygon → gant_polygon)

and I get back:



Could not find layer tiger:gant_polygon

(with text/xml mime type).

Now, this is not what I’d expect from WMS 1.1, the mime type should be
the odd one
and the version 1.2, and using a different schema location.

Now, I looked a bit i the code and it seems there can be only one
exception handler per
service. WFS in fact has just one that does the right thing based on
the version specified
in the request:

if (“1.0.0”.equals(request.getVersion())) {
handle1_0(e, request.getHttpResponse());
} else {
super.handleServiceException(e, request);
}

I guess the WMS one should be modified to follow suit.

Alternatively we should make service exception handlers version
specific, but that would
make for a bigger change

Opinions?

Cheers
Andrea


Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ok, issue fixed. It actually was happening only when the client did not exactly specify 1.1.1. So 1.1.0 would lead to a 1.3.0 service exception report. Issue fixed.

One thing is puzzling me though. Why we use 1.2.0 in service exception reports as the version for 1.1.1 reports. The dtd clearly states 1.1.1 and if i try to make it 1.2.0 cite tests fail.

Actually looking at some existing wms services that are up they appear to return 1.1.1… odd. Confused.

-Justin

On Fri, Dec 17, 2010 at 8:13 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Cool, thanks for the heads up Andrea. I will fix this asap and write a test case for it.

I think for now the quick fix makes more sense and we just check the version but I agree it would be nice longer term to be able to attach an exception handler to a specific version of a service.

On Fri, Dec 17, 2010 at 8:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi Justin,
I know that today you want to release a beta but I think I’ve found a blocking
issue: all service exceptions are being served by the WMS 1.3 exception handler
now.

For example, I make a request with a mis-spelled layer:
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:gant_polygon&styles=&bbox=-180.0,-90.0,180.0,90.0&width=660&height=330&srs=EPSG:4326&format=application/openlayers

(giant_polygon → gant_polygon)

and I get back:



Could not find layer tiger:gant_polygon

(with text/xml mime type).

Now, this is not what I’d expect from WMS 1.1, the mime type should be
the odd one
and the version 1.2, and using a different schema location.

Now, I looked a bit i the code and it seems there can be only one
exception handler per
service. WFS in fact has just one that does the right thing based on
the version specified
in the request:

if (“1.0.0”.equals(request.getVersion())) {
handle1_0(e, request.getHttpResponse());
} else {
super.handleServiceException(e, request);
}

I guess the WMS one should be modified to follow suit.

Alternatively we should make service exception handlers version
specific, but that would
make for a bigger change

Opinions?

Cheers
Andrea


Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf



Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

On Fri, Dec 17, 2010 at 5:34 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Ok, issue fixed. It actually was happening only when the client did not
exactly specify 1.1.1. So 1.1.0 would lead to a 1.3.0 service exception
report. Issue fixed.

What happens if we use 1.0.0? :slight_smile: (I think we're trying to support
that one too, right?)

One thing is puzzling me though. Why we use 1.2.0 in service exception
reports as the version for 1.1.1 reports. The dtd clearly states 1.1.1 and
if i try to make it 1.2.0 cite tests fail.

Ah cite, always asking for some little stuff that is not in the spec.

Actually looking at some existing wms services that are up they appear to
return 1.1.1... odd. Confused.

Just one answer: OGC, they make mistakes, them too :-p

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584962313
fax: +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------