1

I am working in an application to edit attribute and features, for which i am trying to use WFST. I have given write access to all users and for all workspaces.Also,i have changed the service level to 'Transactional' in WFS settings. Restarted the tomcat and tried inserting a feature WFS_transactioninsert.xml in the Demo request. But feature is not being added to the layer. is there anything i need to configure? enter image description here enter image description here

<!--
  YOU PROBABLY DO NOT WANT TO RUN THIS QUERY SINCE 
   IT WILL MODIFY YOUR SOURCE DATA FILES

   It will add a simple line to the tasmania_roads dataset.

    -->
   <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.opengis.net/wfs 
   http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd 
  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=" ">
           494475.71056415,5433016.8189323 494982.70115662,5435041.95096618
          </gml:coordinates>
        </gml:LineString>
      </gml:lineStringMember>
    </gml:MultiLineString>
     </topp:the_geom>
     <topp:TYPE>alley</topp:TYPE>
    </topp:tasmania_roads>
   </wfs:Insert>
  </wfs:Transaction>

enter image description here

  • did you make sure to use a user with write permission, next check the log file to see what the error is, or look in the error message returned - add both to the question – Ian Turton Apr 19 '18 at 10:04
  • As you see in the snapshot, i have grant access to all roles – User123 Apr 19 '18 at 10:08
  • but did you actually use a role, or are you anonymous? – Ian Turton Apr 19 '18 at 10:09
  • Yes seems in the demo request it is 'anonymous'. – User123 Apr 19 '18 at 10:11
  • I don't think that will work, use curl (or other tool) to be sure what is happening – Ian Turton Apr 19 '18 at 10:12
0

The issue is with coordinates which do not make sense with EPSG:4326: Coordinates 494475.71056415,5433016.8189323 494982.70115662,5435041.9509661. I tried inserting with 4326 and insert worked perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.