AW: [Geoserver-devel] Transactions: inserts

What are the error's you're getting? Another thing to try is to
declare all the namespaces with prefixes and use those, as that's how
we've tested everything. I agree that we should also support this
way, but am curious about figure out exactly what's going wrong here.

I changed the request xml so that it uses prefixes everywhere. But of course
it did not work either (if it did work, it would be a VERY strange).

The error I get is:
org.vfny.geoserver.responses.WfsTransactionException:
org.vfny.geoserver.responses.WfsTransactionException: Problem updating
features:
org.geotools.data.DataSourceException: Geometry Conversion error when adding
features:
java.sql.SQLException: Logisches Handle nicht mehr gültig cause:
oracle.sdoapi.geom.InvalidGeometryException: java.sql.SQLException:
Logisches Handle nicht mehr gültig
        at
org.vfny.geoserver.responses.TransactionResponse.getSub(TransactionResponse.
java:212)
        at
org.vfny.geoserver.responses.TransactionResponse.getXmlResponse(TransactionR
esponse.java:105)
        at
org.vfny.geoserver.servlets.Transaction.doPost(Transaction.java:65)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

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

> I cannot get inserts working. The features I receive on the server
> side do not have any attributes. The attributes are somehow dropped
> along the xml filter chain. It is (most likely) not a data source
> related problem. I believe the source of problems lies in
> TransactionFeatureHandler.
>
> Any ideas what might cause this problem? Otherwise I will start to
> debug the filter chain step by step and see where the attributes are
> dropped (the received xml seems to be ok).
>
> An example of what I receive on server side:
> <?xml version="1.0" encoding="utf-16"?>
> <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 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>
>
> Another question: are optional attributes supported by the
> TransactionFeatureHandler? The above feature type could have some
> more attributes but they are all optional (in short: the FeatureType
> has a corresponding attribute for them, but the created feature does
> not). Does this cause any problems? I think I've glimpsed some
> potential problem areas, that's why I ask.
>

Optional attributes do not seem to work in oracle spatial datasource. Oracle
data source fails if there are less attributes in a feature than attribute
types in a feature type (don't know about other datasources). Actually, this
may be partly (is?) the fault of TransactionFeatureHandler that does not
create a proper attribute array that is passed to the create method of
FeatureType. I am lucky enough to write the client software myself so I can
make sure these attributes are added to each request. So for the moment, I
can work around this particular problem.

I'm seriously thinking about rewriting this whole transaction request xml
handling stuff. I'm running constantly into things that do not work as
expected. What would be the requirements for this? I've seen the thread on
geotools-dev list from Ian Schneider about gml parsing.

Simon