<wfs:Transaction service=“WFS” version=“1.0.0”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:topp=“http://www.openplans.org/topp”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.openplans.org/topp http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:tasmania_state_boundaries”>
wfs:Insert
topp:tasmania_state_boundaries
<gml:Point srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
<gml:coordinates decimal=“.” cs=“,” ts=" ">147.7,-42.1800</gml:coordinates>
</gml:Point>
</topp:tasmania_state_boundaries>
</wfs:Insert>
</wfs:Transaction>
I send this WFS to Geoserver,why i always got this kind of error:
<?xml version="1.0" ?>-
java.lang.ArrayIndexOutOfBoundsException: -1 at org.vfny.geoserver.wfs.requests.TransactionFeatureHandler.geometry(TransactionFeatureHandler.java:383) at org.geotools.gml.GMLFilterGeometry.geometryEnd(GMLFilterGeometry.java:102) at org.geotools.gml.GMLFilterDocument.endElement(GMLFilterDocument.java:253) at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:626) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405) at org.vfny.geoserver.wfs.requests.readers.TransactionXmlReader.read(TransactionXmlReader.java:66) at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:375) at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatcher.java:286) at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doPost(WfsDispatcher.java:175) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)
but if i insert line it could work:
<wfs:Transaction service=“WFS” version=“1.0.0”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:topp=“http://www.openplans.org/topp”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.openplans.org/topp http://localhost:8080/geoserver/wfs/DescribeFeatureType?typeName=topp:tasmania_roads”
wfs:Insert
topp:tasmania_roads
topp:the_geom
<gml:MultiLineString srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
gml:lineStringMember
gml:LineString
<gml:coordinates decimal=“.” cs=“,” ts=" ">
147.522247,-41.859921 147.541656,-42.217743
</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</topp:the_geom>
</topp:tasmania_roads>
</wfs:Insert>
</wfs:Transaction>