Hi everybody,

I have a pproblem with the GML 3 parser from geotools.
I have an GML and a schema, but in the method getImports I get an error 
message, and no result object.

Can somebody find a solution for this problem?

The Error message is:
Dez 12, 2014 1:54:45 PM org.geotools.xml.Schemas getImports
INFORMATION: Schema import wasn't resolved: http://www.opengis.net/gml 
declared location: http://schemas.opengis.net/gml/3.1.1/base/gml.xsd
Dez 12, 2014 1:54:45 PM org.geotools.xml.impl.ParserHandler startElement
INFORMATION: parser configuration specified schema: 
'http://www.openplans.org/n52', but instance document does not reference 
this schema.

2014-12-12 13:54:45,660 [pool-1-thread-4] ERROR 
org.n52.wps.io.datahandler.parser.GML3BasicParser: Exception while 
handling parsed GML.
org.xml.sax.SAXException: Handler for n52:TestGML could not be found.
        at 
org.geotools.xml.impl.ParserHandler.startElement(ParserHandler.java:676) 
~[gt-xsd-core-8.7.jar:na]


Here is my GML:
<gml:FeatureCollection
xmlns:gml="http://www.opengis.net/gml";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="
http://www.opengis.net/gml
http://schemas.opengis.net/gml/3.1.1/base/feature.xsd
http://www.openplans.org/n52
http://localhost:8282/wps-demo-dev/demos/testGML.xsd";>
        <gml:featureMember>
                <n52:TestGML xmlns:n52="http://www.openplans.org/n52"; 
gml:id="ID0">
                        <gml:boundedBy>
                                <gml:Envelope srsDimension="2" 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
                                        <gml:lowerCorner>10.0 
10.0</gml:lowerCorner>
                                        <gml:upperCorner>10.0 
10.0</gml:upperCorner>
                                </gml:Envelope>
                        </gml:boundedBy>
                        <n52:GEOMETRY>
                                <gml:MultiPoint srsDimension="2" 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
                                        <gml:pointMember>
                                                <gml:Point srsDimension="2">
                                                        <gml:pos>10.0 
10.0</gml:pos>
                                                </gml:Point>
                                        </gml:pointMember>
                                </gml:MultiPoint>
                        </n52:GEOMETRY>
                </n52:TestGML>
        </gml:featureMember>
</gml:FeatureCollection>


Here is my schema:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema 
targetNamespace="http://localhost:8282/wps-demo-dev/demos/TestGML"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:n52="http://www.openplans.org/n52";
        elementFormDefault="qualified" version="1.0">
        <xs:import namespace="http://www.opengis.net/gml"; 
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"; />
        <xs:element name="TestGML" type="n52:FeatureType" 
substitutionGroup="gml:_Feature" />
        <xs:complexType name="FeatureType">
                <xs:complexContent>
                        <xs:extension base="gml:AbstractFeatureType">
                                <xs:sequence>
                                        <xs:element name="GEOMETRY" 
type="gml:MultiPointPropertyType">
                                        </xs:element>
                                </xs:sequence>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>
</xs:schema>


Thanks for this.

Felix Scholtyssek

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to