On Tue, Sep 18, 2012 at 6:41 AM, Ben Caradoc-Davies <
[email protected]> wrote:
> Jody,
>
> I have a workaround in final testing.
>
> I am not sure why, but it seems that Andrea's changes in
> 4615daa694a5d84e4270a89f78cf8c**c4a58a5206 as a side-effect appear to
> turn on CITE compliance for this test. (And only this test? Why?)
>
The relevant changes are here:
@@ -678,6 +678,7 @@ public class Dispatcher extends AbstractController {
// sure the "mandatory" parameters are specified, even though we
// succesfully dispatched the request.
if (citeCompliant) {
+ // the version is mandatory for all requests but
GetCapabilities
if (!"GetCapabilities".equalsIgnoreCase(req.getRequest())) {
if (req.getVersion() == null) {
//must be a version on non-capabilities requests
@@ -709,12 +710,13 @@ public class Dispatcher extends AbstractController {
"InvalidParameterValue", "version");
}
}
-
- if (req.getService() == null) {
- //give up
- throw new ServiceException("Could not determine
service",
- "MissingParameterValue", "service");
- }
+ }
+
+ // the service is mandatory for all requests instead
+ if (req.getService() == null) {
+ //give up
+ throw new ServiceException("Could not determine service",
+ "MissingParameterValue", "service");
}
}
@@ -828,15 +830,20 @@ public class Dispatcher extends AbstractController {
}
if (responses.isEmpty()) {
- String msg = "No response: ( object = " +
result.getClass();
-
- if (req.getOutputFormat() != null) {
- msg += (", outputFormat = " + req.getOutputFormat());
+ if(req.getOutputFormat() != null) {
+ throw new ServiceException("Failed to find response
for output format " + req.getOutputFormat(),
+ ServiceException.INVALID_PARAMETER_VALUE,
"outputFormat");
:
Both changes are there to make GeoServer CITE compliant, the CSW exercises
a couple of behavior
that are mandated, but not exercised by other CITE test suites:
- the service parameter is compulsory regardless of the request type
- when the output format is present but wrong the service exception must
refer to it in the
service exception
Did not look at the tests, but the first behavior triggers only in cite
compliance mode, so I
guess the test in question is actually running in cite compliance mode,
though I cannot see why
that is happening
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel