[Geoserver-users] Unexpected behaviour configuring wfs settings by means of rest api

Hi,

I'm not sure if this is a bug, the expected behaviour or i'm doing
something wrong.

I have a file with this content:

<wfs>
  <enabled>true</enabled>
  <maintainer></maintainer>
  <onlineResource></onlineResource>
  <serviceLevel>BASIC</serviceLevel>
</wfs>

That i upload to the rest api:

curl -u "admin:admin" -XPUT -H 'Content-type: text/xml' -d@"file.xml"
http://localhost:8080/geoserver/rest/services/wfs/settings

Doing this i expected that only the fields in the xml were changed but
others like maxFeatures are changed. I'm using geoserver 2.6.

Is this the expected behaviour? Should i always explicitly set all the values?

Thanks

--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Este correo electrónico contiene información estrictamente
confidencial y es de uso exclusivo del destinatario, quedando
prohibida a cualquier otra persona su revelación, copia, distribución,
o el ejercicio de cualquier acción relativa a su contenido. Si ha
recibido este mensaje por error, por favor conteste a su remitente
mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán
cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer
los derecho de oposición, acceso, rectificación y cancelación de
acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de
diciembre, de Protección de Datos de Carácter Personal dirigiéndose a
Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la
dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).

2015-05-18 17:42 GMT+02:00 Francisco Puga <fpuga@anonymised.com>:

Hi,

I'm not sure if this is a bug, the expected behaviour or i'm doing
something wrong.

I have a file with this content:

<wfs>
  <enabled>true</enabled>
  <maintainer></maintainer>
  <onlineResource></onlineResource>
  <serviceLevel>BASIC</serviceLevel>
</wfs>

That i upload to the rest api:

curl -u "admin:admin" -XPUT -H 'Content-type: text/xml' -d@"file.xml"
http://localhost:8080/geoserver/rest/services/wfs/settings

Doing this i expected that only the fields in the xml were changed but
others like maxFeatures are changed. I'm using geoserver 2.6.

Is this the expected behaviour? Should i always explicitly set all the
values?

Changed how? If the values were missing and they are now set to the
built-in defaults,
then I guess it's ok, otherwise, maybe not

Cheers
Andrea

--

Meet us at the INSPIRE Conference in Lisbon 25-29 May 2015! Visit
http://goo.gl/WHKDXT for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

2015-05-18 18:58 GMT+02:00 Andrea Aime <andrea.aime@anonymised.com>:

Changed how? If the values were missing and they are now set to the built-in
defaults,
then I guess it's ok, otherwise, maybe not

After using the rest api maxFeatures gets value 0, but i expect that
keeps the previously value or 1.000.000 (as the demo value [1]) or
Integer.MAX_VALUE (as is set in WFSInfoImpl [2])

I attach the wfs.xml file after use the rest api. BTW i'm using the
geoserver (2.6-SNAPSHOT, git revision 8648905bbf643e) packaged in
opengeosuite 4.5 free edition.

Thanks Andrea

[1] https://github.com/geoserver/geoserver/blob/master/data/release/wfs.xml
[2] https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/WFSInfoImpl.java

wfs.xml (1.87 KB)