Hello,
I try to insert some data into a (postgis) layer. But all my attempts failed.
First of all the Feature I try to insert a new „street“.
Describe Feature XML:
<xsd:schema elementFormDefault=“qualified” targetNamespace=“http://localhost/sa”>
<xsd:import namespace=“http://www.opengis.net/gml” schemaLocation=“http://localhost:8080/geoserver/wfs/schemas/gml/3.1.1/base/gml.xsd”/>
<xsd:complexType name=“2430_road_lineType”>
xsd:complexContent
<xsd:extension base=“gml:AbstractFeatureType”>
xsd:sequence
<xsd:element maxOccurs=“1” minOccurs=“0” name=“gdo_gid” nillable=“true” type=“xsd:long”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“tag” nillable=“true” type=“xsd:string”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“feat_type” nillable=“true” type=“xsd:string”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“geom_type” nillable=“true” type=“xsd:string”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“descriptio” nillable=“true” type=“xsd:string”/>
<xsd:element maxOccurs=“1” minOccurs=“0” name=“the_geom” nillable=“true” type=“gml:MultiLineStringPropertyType”/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name=“2430_road_line” substitutionGroup=“gml:_Feature” type=“sa:2430_road_lineType”/>
</xsd:schema>
The Transaction XML:
<wfs:Transaction
version=“1.0.0”
service=“WFS”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns=“http://localhost/sa”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:gml=“http://www.opengis.net/gml”
xsi:schemaLocation=“http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd”>
wfs:Insert
wfs:2430_road_line
wfs:the_geom
<gml:MultiLineString srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
gml:lineStringMember
gml:LineString
<gml:coordinates decimal=“.” cs=“,” ts=" ">
30.37543,-24.34111 30.41411,-24.37335
</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</wfs:the_geom>
</wfs:2430_road_line>
</wfs:Insert>
</wfs:Transaction>
And last but not least, the Exception:
org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName’:‘)?NCName.
Element or attribute do not match QName production: QName::=(NCName’:')?NCName.
Maybe someone can help me or give me a hint, I really tried everything I can image.
Regards and Thanks,
Sebastian
Sebastian ha scritto:
Hello,
I try to insert some data into a (postgis) layer. But all my attempts failed.
First of all the Feature I try to insert a new „street“.
Describe Feature XML:
<xsd:schema elementFormDefault="qualified" targetNamespace="http://localhost/sa">
<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://localhost:8080/geoserver/wfs/schemas/gml/3.1.1/base/gml.xsd"/>
<xsd:complexType name="2430_road_lineType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="gdo_gid" nillable="true" type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="tag" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="feat_type" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geom_type" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="descriptio" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiLineStringPropertyType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="2430_road_line" substitutionGroup="gml:_Feature" type="sa:2430_road_lineType"/>
</xsd:schema>
The Transaction XML:
<wfs:Transaction
version="1.0.0"
service="WFS"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns="http://localhost/sa"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Insert>
<wfs:2430_road_line>
<wfs:the_geom>
<gml:MultiLineString srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:lineStringMember>
<gml:LineString>
<gml:coordinates decimal="." cs="," ts=" ">
30.37543,-24.34111 30.41411,-24.37335
</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</wfs:the_geom>
</wfs:2430_road_line>
</wfs:Insert>
</wfs:Transaction>
And last but not least, the Exception:
<ServiceExceptionReport version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException> org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.
Element or attribute do not match QName production: QName::=(NCName':')?NCName.
</ServiceException>
</ServiceExceptionReport>
Maybe someone can help me or give me a hint, I really tried everything I can image.
Mumble, I'm not sure if this is the problem GeoServer is reporting
in the error message, but for sure you got the 2430_road_line and the_geom prefixes wrong, they are no part of the gml namespace, they
are part of the "http://localhost/sa" one, so, you should not prefix
them at all, or declare a prefix such as xmlns:sa="http://localhost/sa"
and then use sa:2430_road_line and sa:the_geom.
Hope this helps
Cheers
Andrea