If you append outputFormat=JSON (<a href="http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=getfeature&typename=tows:osm_polygon&maxfeatures=1&outputFormat=JSON">like so</a>) to that request, you'll see that there is no fid returned.<div>
<br></div><div>So the problem seems to be that the JSON outputFormat does not generate a fid, making futher transactions using the response invalid.</div><div><br></div><div>I'm guessing this is not expected behaviour - should I file a ticket?</div>
<div><br></div><div>Kind regards, </div><div>Gissur<br><div><div><br><div class="gmail_quote">2010/10/4 Gissur Žórhallsson <span dir="ltr"><<a href="mailto:gissur@loftmyndir.is">gissur@loftmyndir.is</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Okay, I have narrowed this down.<div><br></div><div>The problem seems to arise when I use JSON as an output format instead of XML against OpenLayers</div><div><br></div><div>If I use JSON I don't get any fids from tinyOWS - but if I switch over to XML they are allocated normally.</div>
<div><br></div><div>Is this a bug or am I doing it wrong?</div><div><br></div><div>Kind regards,</div><div>Gissur<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Sep 28, 2010 at 3:51 PM, Rahkonen Jukka <span dir="ltr"><<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
It works for me, see<br>
<a href="http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=getfeature&typename=tows:osm_polygon&maxfeatures=1" target="_blank">http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=getfeature&typename=tows:osm_polygon&maxfeatures=1</a><br>
<br>
I have primary key in myid column and TinyOWS is using it for fid (<tows:osm_polygon fid="osm_polygon.1">)<br>
<br>
-Jukka-<br>
<br>
<br>
-----Alkuperäinen viesti-----<br>
Lähettäjä: <a href="mailto:tinyows-users-bounces@lists.maptools.org" target="_blank">tinyows-users-bounces@lists.maptools.org</a> puolesta: Gissur Žórhallsson<br>
Lähetetty: ti 28.9.2010 18:15<br>
<div>Vastaanottaja: TinyOWS users discuss list<br>
Aihe: Re: [TinyOWS-users] InvalidParameterValue<br>
<br>
No, this is not the problem - since I have a primary key (called gid)<br>
<br>
The fid is WFS specific and is generated on the fly by the WFS service when<br>
you get the features originally.<br>
<br>
I'm just at a loss at to why I'm not getting fid's from the service - the<br>
tag in the xml is empty.<br>
<br>
On Tue, Sep 28, 2010 at 1:07 PM, Rahkonen Jukka<br>
<<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>>wrote:<br>
<br>
> Hi,<br>
><br>
> I guess that you do not have primary key in your table. If this is the<br>
> case, create it<br>
><br>
> ALTER TABLE my_table add myid serial;<br>
><br>
> ALTER TABLE my_table ADD PRIMARY KEY (myid);<br>
><br>
> -Jukka Rahkonen-<br>
><br>
> ------------------------------<br>
> *Lähettäjä:* <a href="mailto:tinyows-users-bounces@lists.maptools.org" target="_blank">tinyows-users-bounces@lists.maptools.org</a> [mailto:<br>
> <a href="mailto:tinyows-users-bounces@lists.maptools.org" target="_blank">tinyows-users-bounces@lists.maptools.org</a>] *Puolesta *Gissur Žórhallsson<br>
> *Lähetetty:* 28. syyskuuta 2010 13:48<br>
><br>
> *Vastaanottaja:* TinyOWS users discuss list<br>
> *Aihe:* Re: [TinyOWS-users] InvalidParameterValue<br>
><br>
> Okay - got 0.9.0 running - and this is what the log outputs:<br>
> <a href="http://tiny.pastebin.com/GbYyABpN" target="_blank">http://tiny.pastebin.com/GbYyABpN</a><br>
><br>
</div>> <<a href="http://tiny.pastebin.com/HKRYQJKa" target="_blank">http://tiny.pastebin.com/HKRYQJKa</a>>tinyows doesn't give me any fids when<br>
<div><div></div><div>> I request the features originally so I'm not sure what I'm doing wrong.<br>
><br>
> On Mon, Sep 27, 2010 at 3:01 PM, Olivier Courtin <<br>
> <a href="mailto:olivier.courtin@gmail.com" target="_blank">olivier.courtin@gmail.com</a>> wrote:<br>
><br>
>><br>
>> On Sep 27, 2010, at 4:58 PM, Gissur Žórhallsson wrote:<br>
>><br>
>> > user@localhost:/$ opt/tinyows/bin/tinyows --version<br>
>> > gives me this:<br>
>> > 0.8.0 SVN<br>
>> ><br>
>> > Maybe I should upgrade and see whether that changes anything.<br>
>><br>
>> Yes 0.8.0 didn't have log support<br>
>><br>
>> --<br>
>> Olivier<br>
>> _______________________________________________<br>
>> TinyOWS-users mailing list<br>
>> <a href="mailto:TinyOWS-users@lists.maptools.org" target="_blank">TinyOWS-users@lists.maptools.org</a><br>
>> <a href="http://lists.maptools.org/mailman/listinfo/tinyows-users" target="_blank">http://lists.maptools.org/mailman/listinfo/tinyows-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Gissur Žórhallsson<br>
><br>
> Loftmyndir ehf.<br>
> Laugavegur 13<br>
> IS 101 Reykjavķk - Iceland<br>
> sķmi (tel): (+354) 540 2500<br>
> tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is" target="_blank">gissur@loftmyndir.is</a><br>
><br>
><br>
> _______________________________________________<br>
> TinyOWS-users mailing list<br>
> <a href="mailto:TinyOWS-users@lists.maptools.org" target="_blank">TinyOWS-users@lists.maptools.org</a><br>
> <a href="http://lists.maptools.org/mailman/listinfo/tinyows-users" target="_blank">http://lists.maptools.org/mailman/listinfo/tinyows-users</a><br>
><br>
><br>
<br>
<br>
--<br>
Gissur Žórhallsson<br>
<br>
Loftmyndir ehf.<br>
Laugavegur 13<br>
IS 101 Reykjavķk - Iceland<br>
sķmi (tel): (+354) 540 2500<br>
tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is" target="_blank">gissur@loftmyndir.is</a><br>
<br>
_______________________________________________<br>
TinyOWS-users mailing list<br>
<a href="mailto:TinyOWS-users@lists.maptools.org" target="_blank">TinyOWS-users@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/tinyows-users" target="_blank">http://lists.maptools.org/mailman/listinfo/tinyows-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im">Gissur Žórhallsson<br><br>Loftmyndir ehf.<br>Laugavegur 13<br>IS 101 Reykjavķk - Iceland<br>sķmi (tel): (+354) 540 2500<br>tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is" target="_blank">gissur@loftmyndir.is</a><br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Gissur Žórhallsson<br><br>Loftmyndir ehf.<br>Laugavegur 13<br>IS 101 Reykjavķk - Iceland<br>sķmi (tel): (+354) 540 2500<br>tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is">gissur@loftmyndir.is</a><br>
</div></div></div>