[OpenLayers-Users] WFS layer - commit works,
save strategy from WFSProtocol does not work!!!! POST vs GET ?!?!
paweluz
paweluz at o2.pl
Mon Mar 22 07:27:41 EDT 2010
Hi!
I have a really strange problem. At the beginning I was thinking that it was
Geoserver fault, or maybe Postgis but now I think this is Openlayers fault.
At first I was using WFS layer, I had implemented insert, update, delete and
modify functions and everything was was working just great. But since WFS
layer
is deprecated, I started using vector layer with WFSProtocol. And it does
not work!!!
With WFS layer I use something like this
feature.state = OpenLayers.State.INSERT;
mylayes.commit();
In this case my data was successfully in the database.
In Vector layer I used WFSProtocol. Now when I do :
saveStrategy.save();
But I got response in the firebug.
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ows="http://www.opengis.net/ows">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Error performing insert</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Can anyone please explain to me this. How come WFS.commit() works but
savestrategy does not? I know for sure that my code in openlayers is wright.
You may
see it in my previous topic:
http://n2.nabble.com/SaveStrategy-does-not-work-WFSProtocol-with-Vector-Layer-PROBLEM-WITH-POSTGIS-td4762666.html#a4762666
Maybe the reason is that WFS layer use just GET method, and Vector Layer
(WFSProtocol) uses POST method... Can anyone please help me??
The log file from the geoserver you may find at the end of this topic:
http://n2.nabble.com/SaveStrategy-does-not-work-WFSProtocol-with-Vector-Layer-PROBLEM-WITH-POSTGIS-td4762666.html#a4762666
BTW. I am using Geoserver 2.0.1 and OpenLayers 2.8
Regards,
Poul
--
View this message in context: http://n2.nabble.com/WFS-layer-commit-works-save-strategy-from-WFSProtocol-does-not-work-POST-vs-GET-tp4777052p4777052.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list