I resolved my earlier issue thanks to Nguyen's suggestion, thanks!

Am still having issues with certain WFS servers, a good example being:

http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?version=1.0.0&request=getcapab
ilities&service=wfs

I get errors like:

        java.io.IOException: org.xml.sax.SAXException: The value passed in to
gml:NullType was not one of the allowable enumerated values.
        at org.geotools.xml.gml.FCBuffer.hasNext(FCBuffer.java:304)
        at
org.geotools.data.wfs.WFSFeatureReader.loadElement(WFSFeatureReader.java:164
)
        at
org.geotools.data.wfs.WFSFeatureReader.hasNext(WFSFeatureReader.java:153)
        ...

I carefully looked at the xml from the getfeature and getfeaturetype
requests from the server, and don't see anything wrong, but am quite
green(dazed and confused) with xml, schemas, etc.

I took Jody's advice and downloaded the latest uDig, which I then preceded
to get sidetracked playing with. Very nice!  Unfortunately, uDig has the
same issue with above WFS server.

I'd like to continue to use MapServer for WFS serving, and could alter the
XML, but am unsure if its a MapServer issue or a geoTools issue.

Any suggestions?

Thanks,
Drew.




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Simpson
Sent: Monday, October 31, 2005 2:28 PM
To: David Zwiers; [email protected]
Subject: RE: [Geotools-gt2-users] WFS SAXException


I tried to hit several WFS servers out on the Web:

http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?version=1.0.0&request=getcapab
ilities&service=wfs
http://excise.pyr.ec.gc.ca/cgi-bin/mapserv.exe?map=/LocalApps/Mapsurfer/PYRW
QMP.map&version=1.0.0&service=WFS&request=GetCapabilities
http://map.ns.ec.gc.ca/MapServer/mapserv.exe?map=/mapserver/services/envdat/
config.map&service=WFS&version=1.0.0&request=GetCapabilities
http://gws2.pcigeomatics.com/wfs1.0.0/wfs?service=WFS&request=getcapabilitie
s");

None of them worked, so I am starting to think I've got something else wrong
with my GeoTools.
Is there a test WFS I can hit that is confirmed to work with GeoTools 2.1.0?

Thanks,
Drew.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Simpson
Sent: Monday, October 31, 2005 12:53 PM
To: David Zwiers; [email protected]
Subject: RE: [Geotools-gt2-users] WFS SAXException


I tried looking through the code to determine if GeoTools thinks my schema
is "standard", but without any success.
On the GetCapabilities request, how does GeoTools determine if the schema is
standard?
Is it the URL of the schema returned by the WFS server?
If it uses WFSSchema.NAMESPACE, I am having difficulty seeing where
WFSSchema is instantiated and compared to the namespace returned from the
WFS server.

Thanks,
Drew.



 -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David
Zwiers
Sent: Monday, October 31, 2005 10:05 AM
To: Simpson
Cc: [email protected]
Subject: Re: [Geotools-gt2-users] WFS SAXException


For standard schemas (such as this one) schema parsing is skipped. The WFS
schema set is entirely encoded, so if your instance varies from the ogc
standard published version, then you probably want to add your classes into
the WFSSchema class in the plugin, recompile.

The validation for types is turned on during some WFS parsing to speed up
the process, as it allows you to make assumptions.

Hope this helps you,

David



On 10/31/05, Simpson <[EMAIL PROTECTED]> wrote:
Greetings,

In an earlier post (below) I was having trouble with OnlineResource in the
GetCapabilities returned from a WFS server.  I made a local copy of the
WFS-capabiltities.xsd and added a type for OnlineResource, which satisfied
the parser.  However, it now throws:

java.io.IOException: org.xml.sax.SAXException: Type not found for
Comparison_Operators

I can add a type for it too?

This is the standard xsd everyone is using (I think), am I doing something
wrong, or has nobody tried the WFSDatastore?

Not sure if it is a good idea, but where would one turn off strict type
checking?

Thanks for any clarification,
Drew.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Simpson
Sent: Thursday, October 27, 2005 1:34 PM
To: [email protected]
Subject: [Geotools-gt2-users] Service element OnlineResource causing
java.io.IOException: org.xml.sax.SAXException: Type not found for
OnlineResource


Greetings again,

I am trying to connect to a WFS service (served by MapServer) and am
getting:

java.io.IOException: org.xml.sax.SAXException: Type not found for
OnlineResource

This is happening when getcapabilities is issued.

Here is the top of the getcapabilities:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<WFS_Capabilities version="1.0.0" updateSequence="0"
xmlns=" http://www.opengis.net/wfs";
xmlns:ogc="http://www.opengis.net/ogc";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
       xsi:schemaLocation="http://www.opengis.net/wfs
http://ogc.dmsolutions.ca/wfs/1.0.0/WFS-capabilities.xsd"; >
<!--  MapServer version 4.4.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
-->
<Service>
<Name>MapServer WFS</Name>
<Title>WFS for xxxxxx</Title>
<OnlineResource> https://xxxx/xxxxx</OnlineResource>
</Service>


Reviewing the xml at
http://ogc.dmsolutions.ca/wfs/1.0.0/WFS-capabilities.xsd , I don't see any
type declared for OnlineResource, so I think Geotools is rightfully
complaining.

I hunted around the Web for a different xsd, but they all seem to be missing
a type for OnlineResource?

I suppose I either need an xsd that'll pass the validation, a work around to
stop validation, or skip validation for OnlineResource.

Any suggestions?

Thanks for any info,
Drew.




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to