[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-users] connecting to WMS
|
Well I did not have time but here is your answer ... I improved the
error reporting so we could tell what element was causing trouble...
SEVERE: Should not have any children - this is a simpleType (at
+http://www.opengis.net/wms Keyword
org.geotools.xml.handlers.SimpleElementHandler.getHandler(SimpleElementHandler.java:81)
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:410)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown
Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
javax.xml.parsers.SAXParser.parse(Unknown Source)
javax.xml.parsers.SAXParser.parse(Unknown Source)
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:140)
org.geotools.data.wms.test.Geot553Test.testCalongeCapabilities(Geot553Test.java:98)
And there you have it - your capabilities document is not made of simple
keywords ... here is an example that works:
<Keywords>OpenGIS WMS Web Map Server</Keywords>
John Caprez wrote:
I will try and write a test case next time I have geotools open
(geotools is the library we are using for our WFS support; it is
*very* strict about the XML documents - rather than do something
relaxed like use xpath expressions to cherry pick out information it
follows all the schema links and parses the document into objects -
if the document does not line up with the schema we are kind of out
of luck...)
While that may sound like overkill - it *is*. At least it is for
parsing a Capabilities response document; however the approach is the
only way we have found to handle WFS GetFeatures and pull all the
data back into the correct format (ie rather than getting back
Strings we are able to pull it into the correct Java objects for
analysis).
Jody