Todd,

secondary namespaces are only required for the app-schema data store, which does not support WFS-T.

For non-app-schema data stores, namespace prefixes should be defined in the WFS-T request document. The error you see is consistent with an undefined namespace prefix. Try adding an xmlns:aoi_points attribute to the wfs:Transaction element.

Kind regards,
Ben.


On 14/06/18 06:39, Todd Jacobus wrote:
Hi all,

Thank you for viewing this post.  I'm trying to set up a simple WFS-T
datastore on a PostGIS database table that talks to a leaflet map.  I'm
using jquery ajax to send a transaction POST request by sending the
transaction-insert xml stored as a string.  The request seems to go through
just fine, but in the GeoServer logs I see a namespace error:

  "2018-06-13 19:11:16,073 ERROR [geoserver.ows] -
org.xml.sax.SAXParseException; lineNumber: 11; columnNumber: 26; The prefix
"aoi_points" for element "aoi_points:wfst_aoi" is not bound."

Some googling directed me to the secondary namespaces
<http://docs.geoserver.org/stable/en/user/data/app-schema/secondary-namespaces.html#when-to-configure-for-secondary-namespaces>
page in the docs, but I'm not sure what's going on here.  A couple of
things:


    1.  Can someone explain why (or if) a secondary namespace might be
    necessary in this case?
    2.  How can I reference a database table properly in the xml transaction
    request?

Here's the full xml request I'm sending to GeoServer:

         '<wfs:Transaction'
         '  service="WFS"\n'
'  version="1.1.0"\n'
         '  xmlns:grp="http://lab.georepublic.info"\n'
'  xmlns:wfs="http://www.opengis.net/wfs"\n'
'  xmlns:gml="http://www.opengis.net/gml"\n'
'  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n'
'  xsi:schemaLocation="http://www.opengis.net/wfs\n'
'
http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd\n'
'
http://www.example.com/geoserver/wfs/DescribeFeatureType?typename=aoi:wfst_aoi
">\n'
'  <wfs:Insert>\n'
'    <aoi_points:wfst_aoi>\n'
'      <wfst_aoi:geom>\n'
'        <gml:Polygon srsName="urn:x-ogc:def:crs:EPSG:4326">\n'
'          <gml:coordinates decimal="." cs="," ts=" ">' +
geoJson[0].geometry.coordinates + '</gml:coordinates>\n'
'        </gml:Polygon>\n'
'      </wfst_aoi:geom>\n'
'    </aoi_points:wfst_aoi>\n'
'  </wfs:Insert>\n'
'</wfs:Transaction>'

Thanks very much!

Best,
Todd



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to