From: Blax <bl...@gm...> - 2007-04-27 07:01:47
|
hi everyone, i'm new at gis development, so when i've found geoapi, i was too happy because it seems to be a very good api for gis. I'm trying to work with WFS's. The example [1] from tutorial section on the website works properly (the wfs of that example is version 1.0.0). But when i'm trying my wfs (version 1.1.0 with gml's 3.1.1) exceptions occurs :-/ (...) INFO: END: ows:WGS84BoundingBox 26-abr-2007 20:00:59 org.geotools.xml.XMLSAXHandler endElement INFO: END: wfs:FeatureType 26-abr-2007 20:00:59 org.geotools.xml.XMLSAXHandler processException GRAVE: Missing child element for FeatureTypeType org.geotools.xml.wfs.WFSCapabilitiesComplexTypes$FeatureTypeType.getValue(W= FSCapabilitiesComplexTypes.java:1350) org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexEleme= ntHandler.java:185) org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:264) org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi= spatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn= own Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source= ) javax.xml.parsers.SAXParser.parse(SAXParser.java:375) javax.xml.parsers.SAXParser.parse(SAXParser.java:176) org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:139) org.geotools.data.wfs.WFSDataStore.findCapabilities(WFSDataStore.java:2= 12) org.geotools.data.wfs.WFSDataStore.<init>(WFSDataStore.java:188) org.geotools.data.wfs.WFSDataStoreFactory.createNewDataStore(WFSDataSto= reFactory.java:200) WFSDemo.main(WFSDemo.java:28) 26-abr-2007 20:00:59 org.geotools.xml.XMLSAXHandler endElement ADVERTENCIA: Missing child element for FeatureTypeType (...) The code is just a test that i've done: URL url =3D new URL("http://" + HOST + ":" + PORT + "/CHE-WFS/ogcwebservice?REQUEST=3DGetCapabilities&version=3D1.0.0&service= =3DWFS"); Map m =3D new HashMap(); m.put(WFSDataStoreFactory.URL.key,url); m.put(WFSDataStoreFactory.TIMEOUT.key, new Integer(10000)); DataStore wfs =3D (new WFSDataStoreFactory()).createNewDataStore(m); for(String s : wfs.getTypeNames()) System.out.println(s); The WFS response is well formed, i double check the gml respect xml schema (version 1.1.0 [2]). So, i think that maybe the problem is that geotools still can't deal with wfs 1.1.0. Thanks for any help. Jes=FAs. [1] http://geotools.codehaus.org/How+to+use+a+WFS+DataStore [2] http://schemas.opengis.net/wfs/1.1.0/wfs.xsd |