Dear all,
 
I try to make a request with a Filter between a geoserver
WFS and a geometry.
I constructs the filter :
 
FilterFactory2 factory =
(FilterFactory2) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
SimpleFeatureType schema =
source.getSchema();
GeometryDescriptor geomDesc =
schema.getGeometryDescriptor();
Name geomName = geomDesc.getName();
 
Intersects intersects =
factory.intersects(factory.property(geomName), factory.literal(myGeom));
FeatureCollection<SimpleFeatureType,
SimpleFeature> features = source.getFeatures(intersects);
Iterator<SimpleFeature> iterator =
features.iterator();
while(
iterator.hasNext() ){             
      SimpleFeature tabAssFeature = iterator.next();
                …
 
source.getFeatures(intersects) raises logs:
7 juin 2010 11:49:56
org.geotools.xml.XMLSAXHandler fatalError
GRAVE: FATAL Element or attribute do not
match QName production: QName::=(NCName':')?NCName. 
7 juin 2010 11:49:56
org.geotools.xml.XMLSAXHandler fatalError
GRAVE: col 616, line 1
7 juin 2010 11:49:56
org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy createFeatureReaderPOST
ATTENTION: java.io.IOException: org.xml.sax.SAXParseException: Element or
attribute do not match QName production: QName::=(NCName':')?NCName. 
7 juin 2010 11:49:56
org.geotools.xml.XMLSAXHandler fatalError
style='font-size:10.0pt;font-family:"Courier New";color:red'>: Element or attribute
do not match QName production: QName::=(NCName':')?NCName. 
      at
org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:326)
      at
org.geotools.data.wfs.v1_0_0.WFSFeatureReader.loadElement(WFSFeatureReader.java:189)
      at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.hasNext(WFSFeatureReader.java:178)
      at
org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReaderGET(NonStrictWFSStrategy.java:134)
      at
org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.createFeatureReader(NonStrictWFSStrategy.java:101)
      at
org.geotools.data.wfs.v1_0_0.NonStrictWFSStrategy.getFeatureReader(NonStrictWFSStrategy.java:72)
      at
org.geotools.data.wfs.v1_0_0.WFS_1_0_0_DataStore.getFeatureReader(WFS_1_0_0_DataStore.java:747)
      at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)
      at
org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:224)
      at
org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:194)
      at
fr.magellium.kheper.etu_analyser.ui.views.ScenarioProductionView$6.widgetSelected(ScenarioProductionView.java:750)
      ... 26 more
Caused by: org.xml.sax.SAXParseException: Element or attribute do not match
QName production: QName::=(NCName':')?NCName. 
      at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
      at
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at
org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown Source)
      at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at
org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown
Source)
      at
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:140)
     
at org.geotools.data.wfs.v1_0_0.WFSFeatureReader.run(WFSFeatureReader.java:125)
 
I've
readen this : http://www.mail-archive.com/geotools-gt2-users@xxxxxxxxxxxxxxxxxxxxx/msg07701.html
The
WFS feature typename begins with a number (it's "1DC"), but I don't
think it's the problem…
 
Could
you help me please?
Thanks!
 
Regards,
 
Virginie BERRE - Ingénieur d'études et de développement
+33 (0)1 30 15
40 58 (n° direct)
virginie.berre@xxxxxxxxxxxx
 
  | 
  
 | 
 
  | ZA Les Erables
  - bâtiment 4 66, route de
  Sartrouville78230 Le Pecq
 Tel: +33 (0)1 30 15 40 50 (standard)
 Fax: +33 (0)1 30 15 40 60
 www.magellium.fr
 | ![MAGELLIUM]()
 | 
![MAGELLIUM]() Pensez environnement ! N'imprimez ce mail que si c'est
vraiment nécessaire !
Pensez environnement ! N'imprimez ce mail que si c'est
vraiment nécessaire !