Attempting to validate GetFeature results with xsd Parser fails
---------------------------------------------------------------
Key: GEOS-2454
URL: http://jira.codehaus.org/browse/GEOS-2454
Project: GeoServer
Issue Type: Bug
Components: WFS
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Fix For: 2.0.x
I've tried to validate a GetFeature output with Parser, but the result refers a schema that cannot be reached:
{code}
org.xml.sax.SAXException: error validating
at org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:306)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.geotools.xml.Parser.parse(Parser.java:221)
at org.geotools.xml.Parser.parse(Parser.java:149)
at org.geotools.xml.Parser.parse(Parser.java:198)
at org.geoserver.wfs.WFSTestSupport.checkValidationErrors(WFSTestSupport.java:84)
at org.geoserver.wfs.GetFeatureTest.testFeatureBoundingEnabled(GetFeatureTest.java:162)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.geoserver.test.GeoServerAbstractTestSupport.runTest(GeoServerAbstractTestSupport.java:129)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.io.FileNotFoundException: http://localhost:80/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=cite:Forests
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:255)
at org.geotools.xml.Schemas.validateImportsIncludes(Schemas.java:288)
at org.geotools.xml.Schemas.validateImportsIncludes(Schemas.java:258)
at org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:303)
... 32 more
{code}
Any suggestion on how to work around this? The configuration comes from WFSTestSupport.getXmlConfiguration11()
so it has a reference to the feature type builders... maybe I'm missing some glue there...
Besides that, the validation code is a copy of the one you provided for WPSTestSupport.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira