Hello Geoserver Users List,

I encountered a scenario that I'd like to report. When attempting to post a 
WFS-T XML to GeoServer, I inadvertently mistyped one of the insert tags (see 
highlighted in yellow below). In the Geoserver log, I saw that it couldn't 
resolve the incorrect insert tag and ignored it. It then proceeded to process 
the subsequent insert in the transaction with success. GeoServer responded back 
to the client with success and the fid of the successful insert. Would there be 
any negative ramifications if the server simply failed the entire transaction 
and reported back to the user that the request was failed because it could not 
resolve some tags found in the request. I'll gladly provide any additional test 
data you may require upon reviewing this. Thanks to the GeoServer community for 
such a great product!

My Configuration:

  *   GeoServer 2.8-SNAPSHOT running on Java 1.7.0_79 64 bits, running on 
Ubuntu Server 14.04.3 LTS
  *   Web Container: Tomcat 7
  *   Data Source: Oracle
WFS-T Request (note error in the lowercase text of the first <insert> tag):

<?xml version="1.0" encoding="UTF-8"?>

<Transaction

    xmlns="http://www.opengis.net/wfs";

    xmlns:myws="http://byers.com/solution/myws";

    xmlns:gml="http://www.opengis.net/gml";

    xmlns:ogc="http://www.opengis.net/ogc"; version="1.0.0" service="WFS">

    <insert>

        <myws:MyDevice fid="none">

            <myws:DISPOSITION>active</myws:DISPOSITION>

            <myws:LOCATION_ID>5</myws:LOCATION_ID>

            <myws:MANUF_CD>123ABC</myws:MANUF_CD>

            <myws:MODEL_CD>456XYZ</myws:MODEL_CD>

            <myws:QUANTITY>2</myws:QUANTITY>

        </myws:SignalCtrlDev>

    </insert>

    <Insert>

        <myws:MyDevice fid="none">

            <myws:DISPOSITION>active</myws:DISPOSITION>

            <myws:LOCATION_ID>8</myws:LOCATION_ID>

            <myws:MANUF_CD>ABC123</myws:MANUF_CD>

            <myws:MODEL_CD>XYZ456</myws:MODEL_CD>

            <myws:QUANTITY>3</myws:QUANTITY>

        </myws:SignalCtrlDev>

    </Insert>



</Transaction>

Warning logged by GeoServer:

...

2015-10-16 20:04:03,217 DEBUG [geotools.xml] - Could not find declaration for: 
{http://www.opengis.net/wfs}insert. Checking if containing type declares a 
single particle.
2015-10-16 20:04:03,217 DEBUG [geotools.xml] - Could not find declaration for: 
{http://www.opengis.net/wfs}insert. Performing lookup by ignoring namespace
2015-10-16 20:04:03,217 DEBUG [geotools.xml] - Could not find declaration for: 
{http://www.opengis.net/wfs}insert. Creating a mock element declaration and 
parsing anyways...

...
Response returned to client:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:WFS_TransactionResponse version="1.0.0" 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://devsrv:80/geoserver/schemas/wfs/1.0.0/WFS-transaction.xsd";>
    <wfs:InsertResult>
        <ogc:FeatureId fid="MyDevice.7371772"/>
    </wfs:InsertResult>
    <wfs:TransactionResult>
        <wfs:Status>
            <wfs:SUCCESS/>
        </wfs:Status>
    </wfs:TransactionResult>
</wfs:WFS_TransactionResponse>



------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to