[Geoserver-devel] Transactions

I try to insert a feature into a table with oracle data source. The
Transaction response says the transaction was successful, but the
feature is not inserted into the data source. It should at least report
that the transaction failed and try to describe the problem as
accurately as possible.

The request is:
<wfs:Transaction version="1.0.0" service="WFS"
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
  <wfs:Insert handle="insert gps point">
    <RQS_POINT xsi:schemaLocation="http://www.c-plan.com/tb
http://localhost:8080/geoserver/DescribeFeatureType&quot;
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
               xmlns="http://www.someserver.com/myns&quot;&gt;
      <GEOM>
        <Point xmlns="http://www.opengis.net/gml&quot;&gt;
          <coord>
            <X>202238.869</X>
            <Y>604600.558</Y>
            <Z>578.672</Z>
          </coord>
        </Point>
      </GEOM>
    </RQS_POINT>
  </wfs:Insert>
</wfs:Transaction>

The response is:
<wfs:WFS_TransactionResponse
   version="1.0.0"
   xmlns:wfs="http://www.opengis.net/wfs&quot;
   xmlns:ogc="http://www.opengis.net/ogc&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/wfs
http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-transact
ion.xsd">
   <wfs:InsertResult handle="insert gps point">
   </wfs:InsertResult>
   <wfs:TransactionResult>
      <wfs:Status>
         <wfs:SUCCESS/>
      </wfs:Status>
   </wfs:TransactionResult>
</wfs:WFS_TransactionResponse>

Simon

I'm still running into a problem with transactions. I try to add a
feature to the data source but the operation fails.

The datasource I'm using is the oracle data source. I've tracked the
problem to line 210 of OracleDataSource:

  if (!tableName.endsWith(feature.getFeatureType().getTypeName())) {

The problem is that feature.getFeatureType().getTypeName() is something
like:
  <ns-prefix>:<table-name>

I assume the type name should only be <table-name>, without the
namespace prefix (because there is a getNamespace() method that gets the
namespace). Is this a general problem with the TypeRespository? Or is it
a problem with my request (see below)?

Simon

Don't know

I try to insert a feature into a table with oracle data source. The
Transaction response says the transaction was successful, but the
feature is not inserted into the data source. It should at least

report

that the transaction failed and try to describe the problem as
accurately as possible.

The request is:
<wfs:Transaction version="1.0.0" service="WFS"
xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
  <wfs:Insert handle="insert gps point">
    <RQS_POINT xsi:schemaLocation="http://www.someserver.com/myns
http://localhost:8080/geoserver/DescribeFeatureType&quot;
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
               xmlns="http://www.someserver.com/myns&quot;&gt;
      <GEOM>
        <Point xmlns="http://www.opengis.net/gml&quot;&gt;
          <coord>
            <X>202238.869</X>
            <Y>604600.558</Y>
            <Z>578.672</Z>
          </coord>
        </Point>
      </GEOM>
    </RQS_POINT>
  </wfs:Insert>
</wfs:Transaction>

The response is:
<wfs:WFS_TransactionResponse
   version="1.0.0"
   xmlns:wfs="http://www.opengis.net/wfs&quot;
   xmlns:ogc="http://www.opengis.net/ogc&quot;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation="http://www.opengis.net/wfs

http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-transact

ion.xsd">
   <wfs:InsertResult handle="insert gps point">
   </wfs:InsertResult>
   <wfs:TransactionResult>
      <wfs:Status>
         <wfs:SUCCESS/>
      </wfs:Status>
   </wfs:TransactionResult>
</wfs:WFS_TransactionResponse>

Simon

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Ok, this should fix the problem. I think the problem wasn't showing up in
postgis since we weren't checking to make sure the typenames were the
same. It's now fixed in cvs on head and wms-merge (I'm planning on
merging the branches later this week). If oracle people could try this
out that'd be great.

Chris

On Wed, 10 Dec 2003, Simon Räss wrote:

I'm still running into a problem with transactions. I try to add a
feature to the data source but the operation fails.

The datasource I'm using is the oracle data source. I've tracked the
problem to line 210 of OracleDataSource:

  if (!tableName.endsWith(feature.getFeatureType().getTypeName())) {

The problem is that feature.getFeatureType().getTypeName() is something
like:
  <ns-prefix>:<table-name>

I assume the type name should only be <table-name>, without the
namespace prefix (because there is a getNamespace() method that gets the
namespace). Is this a general problem with the TypeRespository? Or is it
a problem with my request (see below)?

Simon

Don't know
> I try to insert a feature into a table with oracle data source. The
> Transaction response says the transaction was successful, but the
> feature is not inserted into the data source. It should at least
report
> that the transaction failed and try to describe the problem as
> accurately as possible.
>
> The request is:
> <wfs:Transaction version="1.0.0" service="WFS"
> xmlns:wfs="http://www.opengis.net/wfs&quot;&gt;
> <wfs:Insert handle="insert gps point">
> <RQS_POINT xsi:schemaLocation="http://www.someserver.com/myns
> http://localhost:8080/geoserver/DescribeFeatureType&quot;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
> xmlns="http://www.someserver.com/myns&quot;&gt;
> <GEOM>
> <Point xmlns="http://www.opengis.net/gml&quot;&gt;
> <coord>
> <X>202238.869</X>
> <Y>604600.558</Y>
> <Z>578.672</Z>
> </coord>
> </Point>
> </GEOM>
> </RQS_POINT>
> </wfs:Insert>
> </wfs:Transaction>
>
> The response is:
> <wfs:WFS_TransactionResponse
> version="1.0.0"
> xmlns:wfs="http://www.opengis.net/wfs&quot;
> xmlns:ogc="http://www.opengis.net/ogc&quot;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
> xsi:schemaLocation="http://www.opengis.net/wfs
>
http://localhost:8080/geoserver/data/capabilities/wfs/1.0.0/WFS-transact
> ion.xsd">
> <wfs:InsertResult handle="insert gps point">
> </wfs:InsertResult>
> <wfs:TransactionResult>
> <wfs:Status>
> <wfs:SUCCESS/>
> </wfs:Status>
> </wfs:TransactionResult>
> </wfs:WFS_TransactionResponse>
>
> Simon
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--

(attachments)

TransactionFeatureHandler.java (11.3 KB)