Hi,
the cite guys just hit me with a wcs request that contains
quite a bit of xml errors:

  <GetCoverage xmlns="http://www.opengis.net/wcs/1.1.1";
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                    xmlns:ctl="http://www.occamlab.com/ctl";
                    xmlns:ows="http://www.opengis.org/ows/1.1";
                    service="WCS"
                    version="1.1.1"
                    xsi:schemaLocation="http://www.opengis.net/wcs/1.1.1 
http://schemas.opengis.net/wcs/1.1.1/wcsAll.xsd";>
          <Identifier>topp:rotated</Identifier>
          <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::3003">
             <ows:LowerCorner>1402796.735086838 
5000064.822668008</ows:LowerCorner>
             <ows:UpperCorner>1402868.2853603114 
5000119.220342959</ows:UpperCorner>
          </ows:BoundingBox>
          <Format>application/arcgrid</Format>
       </GetCoverage>

Well, if we exclude the fact that the schema is not there,
there are other issues: the
Identifier element is not prefixed with ows: (it should),
the ows:boundingBox element is not a direct child of
GetCoverage (it should be enclosed with

I configured the xml parser with .setValidating(true),
yet it happily tries to parse the document anyways
and breaks with the following exception:

java.lang.RuntimeException: Parsing failed for GetCoverage: 
java.lang.ClassCastException: java.lang.String cannot be cast to 
net.opengis.ows.v1_1_0.CodeType
Parsing failed for GetCoverage: java.lang.ClassCastException: 
java.lang.String cannot be cast to net.opengis.ows.v1_1_0.CodeType
java.lang.String cannot be cast to net.opengis.ows.v1_1_0.CodeType

That is, it tried to parse Identifier into a string (it's a codeType
instead) and to set it... I thought validation should have complained
loudly about the xml document itself? I guess I'm looking for a
setValidatingIReallyMeanIt(true) method :)

Cheers
Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to