[Geoserver-users] REST featureType deletion

Hi,

I’m using the REST API to manage the feature types on a Geoserver (1.7.4 version).

When I create a feature type on the server, I also create two styles for this feature type and associates them to the feature by updating the layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the featureType seems does not seem to delete the layer using it and no DELETE request seems to be available on /rest/layers/ (I get a 405 return code when trying). I have to re-load the configuration using the standard web configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d’Application

Tel. 04 78 17 88 21


Ce message et les pièces jointes sont confidentiels et réservés à l’usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d’en avertir immédiatement l’expéditeur et de le détruire. L’intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l’expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d’un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

You can delete the layer by using its namespace/workspace prefix. So if you do:

DELETE /rest/layers/<ns>:<theFeatureTypeName>

It should work.

This is sort of a hacky workaround to deal with how the internal model works. The resource publishing split which has been talked about on the developer list should fix this problem. But that won't be until 2.1.

-Justin

Pascal Romaric wrote:

Hi,

I'm using the REST API to manage the feature types on a Geoserver (1.7.4 version).

When I create a feature type on the server, I also create two styles for this feature type and associates them to the feature by updating the layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the featureType seems does not seem to delete the layer using it and no DELETE request seems to be available on /rest/layers/<theFeatureTypeName> (I get a 405 return code when trying). I have to re-load the configuration using the standard web configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d'Application

Tel. 04 78 17 88 21

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

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

It is appreciated if all inquiries are kept on the public list. Thanks.

Do you get a message back when you try to do the delete? Can you go to the user interface, turn up logging to GEOSERVER_DEVELOPER_LOGGING and try again. You should see a stack trace of some sort on the console or in the log.

-Justin

Pascal Romaric wrote:

First, thanks for the quick answer.

It seems that it is the DELETE method that is problematic on /rest/layers/xxx resources. Even when prefixing the featureType with the namespace, the server still sends me back a 405 (Method not allowed) response.

Was it the only way ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 18:51
À : Pascal Romaric
Cc : geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] REST featureType deletion

You can delete the layer by using its namespace/workspace prefix. So if
you do:

DELETE /rest/layers/<ns>:<theFeatureTypeName>

It should work.

This is sort of a hacky workaround to deal with how the internal model
works. The resource publishing split which has been talked about on the
developer list should fix this problem. But that won't be until 2.1.

-Justin

Pascal Romaric wrote:

Hi,

I'm using the REST API to manage the feature types on a Geoserver (1.7.4
version).

When I create a feature type on the server, I also create two styles for
this feature type and associates them to the feature by updating the
layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the
featureType seems does not seem to delete the layer using it and no
DELETE request seems to be available on
/rest/layers/<theFeatureTypeName> (I get a 405 return code when
trying). I have to re-load the configuration using the standard web
configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d'Application

Tel. 04 78 17 88 21

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

Ce message et les pièces jointes sont confidentiels et réservés à
l'usage exclusif de ses destinataires. Il peut également être protégé
par le secret professionnel. Si vous recevez ce message par erreur,
merci d'en avertir immédiatement l'expéditeur et de le détruire.
L'intégrité du message ne pouvant être assurée sur Internet, la
responsabilité du groupe Atos Origin ne pourra être recherchée quant au
contenu de ce message. Bien que les meilleurs efforts soient faits pour
maintenir cette transmission exempte de tout virus, l'expéditeur ne
donne aucune garantie à cet égard et sa responsabilité ne saurait être
recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it. As
its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Looks like I didn't hit Reply All button last time :wink:

I checked the contents of the response : it is empty, looks like only the code is returned.
As for the debug traces, even with the most verbose option, no stacktraces (which sounds pretty normal as the return code is not a 5xx one). All I get is :
13 août 11:58:33 DEBUG [geoserver.filters] - filtering http://mydomain.com/geoserver/rest/layers/vnf:DT1382
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/layers/vnf:dt1382'; to: '/rest/layers/vnf:dt1382' and httpMethod= DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@cd6798
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: GET
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=false
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@4d0923
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: POST
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[1]: DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[2]: PUT
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=true

Can it be a matter of version, as my server is only in 1.7.4 ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 22:14
À : Pascal Romaric; geoserver-users
Objet : Re: [Geoserver-users] REST featureType deletion

It is appreciated if all inquiries are kept on the public list. Thanks.

Do you get a message back when you try to do the delete? Can you go to
the user interface, turn up logging to GEOSERVER_DEVELOPER_LOGGING and
try again. You should see a stack trace of some sort on the console or
in the log.

-Justin

Pascal Romaric wrote:

First, thanks for the quick answer.

It seems that it is the DELETE method that is problematic on /rest/layers/xxx resources. Even when prefixing the featureType with the namespace, the server still sends me back a 405 (Method not allowed) response.

Was it the only way ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 18:51
À : Pascal Romaric
Cc : geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] REST featureType deletion

You can delete the layer by using its namespace/workspace prefix. So if
you do:

DELETE /rest/layers/<ns>:<theFeatureTypeName>

It should work.

This is sort of a hacky workaround to deal with how the internal model
works. The resource publishing split which has been talked about on the
developer list should fix this problem. But that won't be until 2.1.

-Justin

Pascal Romaric wrote:

Hi,

I'm using the REST API to manage the feature types on a Geoserver (1.7.4
version).

When I create a feature type on the server, I also create two styles for
this feature type and associates them to the feature by updating the
layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the
featureType seems does not seem to delete the layer using it and no
DELETE request seems to be available on
/rest/layers/<theFeatureTypeName> (I get a 405 return code when
trying). I have to re-load the configuration using the standard web
configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d'Application

Tel. 04 78 17 88 21

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

Ce message et les pièces jointes sont confidentiels et réservés à
l'usage exclusif de ses destinataires. Il peut également être protégé
par le secret professionnel. Si vous recevez ce message par erreur,
merci d'en avertir immédiatement l'expéditeur et de le détruire.
L'intégrité du message ne pouvant être assurée sur Internet, la
responsabilité du groupe Atos Origin ne pourra être recherchée quant au
contenu de ce message. Bien que les meilleurs efforts soient faits pour
maintenir cette transmission exempte de tout virus, l'expéditeur ne
donne aucune garantie à cet égard et sa responsabilité ne saurait être
recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it. As
its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

Hmm... strange. It could be that this is an issue that was fixed, but i don't quite remember such an issue with deleting layers. You never know though. Could you perhaps try the latest 1.7.6 version to see if the problem persists?

Pascal Romaric wrote:

Looks like I didn't hit Reply All button last time :wink:

I checked the contents of the response : it is empty, looks like only the code is returned.
As for the debug traces, even with the most verbose option, no stacktraces (which sounds pretty normal as the return code is not a 5xx one). All I get is :
13 août 11:58:33 DEBUG [geoserver.filters] - filtering http://mydomain.com/geoserver/rest/layers/vnf:DT1382
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/layers/vnf:dt1382'; to: '/rest/layers/vnf:dt1382' and httpMethod= DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@cd6798
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: GET
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=false
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@4d0923
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: POST
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[1]: DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[2]: PUT
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=true

Can it be a matter of version, as my server is only in 1.7.4 ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 22:14
À : Pascal Romaric; geoserver-users
Objet : Re: [Geoserver-users] REST featureType deletion

It is appreciated if all inquiries are kept on the public list. Thanks.

Do you get a message back when you try to do the delete? Can you go to
the user interface, turn up logging to GEOSERVER_DEVELOPER_LOGGING and
try again. You should see a stack trace of some sort on the console or
in the log.

-Justin

Pascal Romaric wrote:

First, thanks for the quick answer.

It seems that it is the DELETE method that is problematic on /rest/layers/xxx resources. Even when prefixing the featureType with the namespace, the server still sends me back a 405 (Method not allowed) response.

Was it the only way ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 18:51
À : Pascal Romaric
Cc : geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] REST featureType deletion

You can delete the layer by using its namespace/workspace prefix. So if
you do:

DELETE /rest/layers/<ns>:<theFeatureTypeName>

It should work.

This is sort of a hacky workaround to deal with how the internal model
works. The resource publishing split which has been talked about on the
developer list should fix this problem. But that won't be until 2.1.

-Justin

Pascal Romaric wrote:

Hi,

I'm using the REST API to manage the feature types on a Geoserver (1.7.4
version).

When I create a feature type on the server, I also create two styles for
this feature type and associates them to the feature by updating the
layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the
featureType seems does not seem to delete the layer using it and no
DELETE request seems to be available on
/rest/layers/<theFeatureTypeName> (I get a 405 return code when
trying). I have to re-load the configuration using the standard web
configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d'Application

Tel. 04 78 17 88 21

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

Ce message et les pièces jointes sont confidentiels et réservés à
l'usage exclusif de ses destinataires. Il peut également être protégé
par le secret professionnel. Si vous recevez ce message par erreur,
merci d'en avertir immédiatement l'expéditeur et de le détruire.
L'intégrité du message ne pouvant être assurée sur Internet, la
responsabilité du groupe Atos Origin ne pourra être recherchée quant au
contenu de ce message. Bien que les meilleurs efforts soient faits pour
maintenir cette transmission exempte de tout virus, l'expéditeur ne
donne aucune garantie à cet égard et sa responsabilité ne saurait être
recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it. As
its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Looks like the problem was related to the version I used. Upgrading to 1.7.6 allowed me to correctly delete the layers by sending DELETE requests to /rest/layers/myLayer (worked without using the namespace before the layer name).

Thanks for your help.

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : jeudi 13 août 2009 16:44
À : Pascal Romaric
Cc : geoserver-users
Objet : Re: [Geoserver-users] REST featureType deletion

Hmm... strange. It could be that this is an issue that was fixed, but i
don't quite remember such an issue with deleting layers. You never know
though. Could you perhaps try the latest 1.7.6 version to see if the
problem persists?

Pascal Romaric wrote:

Looks like I didn't hit Reply All button last time :wink:

I checked the contents of the response : it is empty, looks like only the code is returned.
As for the debug traces, even with the most verbose option, no stacktraces (which sounds pretty normal as the return code is not a 5xx one). All I get is :
13 août 11:58:33 DEBUG [geoserver.filters] - filtering http://mydomain.com/geoserver/rest/layers/vnf:DT1382
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Converted URL to lowercase, from: '/rest/layers/vnf:dt1382'; to: '/rest/layers/vnf:dt1382' and httpMethod= DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@cd6798
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: GET
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=false
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - ~~~~~~~~~~ antPath= /** methodList= [Ljava.lang.String;@4d0923
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[0]: POST
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[1]: DELETE
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - method[2]: PUT
13 août 11:58:33 DEBUG [security.RESTfulPathBasedFilterInvocationDefinitionMap] - Candidate is: '/rest/layers/vnf:dt1382'; antPath is /**; matchedPath=true; matchedMethods=true

Can it be a matter of version, as my server is only in 1.7.4 ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 22:14
À : Pascal Romaric; geoserver-users
Objet : Re: [Geoserver-users] REST featureType deletion

It is appreciated if all inquiries are kept on the public list. Thanks.

Do you get a message back when you try to do the delete? Can you go to
the user interface, turn up logging to GEOSERVER_DEVELOPER_LOGGING and
try again. You should see a stack trace of some sort on the console or
in the log.

-Justin

Pascal Romaric wrote:

First, thanks for the quick answer.

It seems that it is the DELETE method that is problematic on /rest/layers/xxx resources. Even when prefixing the featureType with the namespace, the server still sends me back a 405 (Method not allowed) response.

Was it the only way ?

Romaric

-----Message d'origine-----
De : Justin Deoliveira [mailto:jdeolive@anonymised.com]
Envoyé : mercredi 12 août 2009 18:51
À : Pascal Romaric
Cc : geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] REST featureType deletion

You can delete the layer by using its namespace/workspace prefix. So if
you do:

DELETE /rest/layers/<ns>:<theFeatureTypeName>

It should work.

This is sort of a hacky workaround to deal with how the internal model
works. The resource publishing split which has been talked about on the
developer list should fix this problem. But that won't be until 2.1.

-Justin

Pascal Romaric wrote:

Hi,

I'm using the REST API to manage the feature types on a Geoserver (1.7.4
version).

When I create a feature type on the server, I also create two styles for
this feature type and associates them to the feature by updating the
layer entry that was created. Everything works pretty well:

Problem comes when I try to delete a feature. The deletion of the
featureType seems does not seem to delete the layer using it and no
DELETE request seems to be available on
/rest/layers/<theFeatureTypeName> (I get a 405 return code when
trying). I have to re-load the configuration using the standard web
configuration pages to make the layer disapear.

Is reloading the configuration the only solution or did I miss something ?

Romaric PASCAL

Atos Worldline - Responsable d'Application

Tel. 04 78 17 88 21

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

Ce message et les pièces jointes sont confidentiels et réservés à
l'usage exclusif de ses destinataires. Il peut également être protégé
par le secret professionnel. Si vous recevez ce message par erreur,
merci d'en avertir immédiatement l'expéditeur et de le détruire.
L'intégrité du message ne pouvant être assurée sur Internet, la
responsabilité du groupe Atos Origin ne pourra être recherchée quant au
contenu de ce message. Bien que les meilleurs efforts soient faits pour
maintenir cette transmission exempte de tout virus, l'expéditeur ne
donne aucune garantie à cet égard et sa responsabilité ne saurait être
recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it. As
its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender
does not warrant that this transmission is virus-free and will not be
liable for any damages resulting from any virus transmitted.

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july

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

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.