Discussion:
messageRequest method 'DELETE' not supported
(too old to reply)
giraam
2010-05-31 21:23:39 UTC
Permalink
Hi!

I'm trying to save changes that were made on a vector layer but when I click
the save button I got this on Firebug:

HTTP Status 405 - Request method 'DELETE' not supported

type Status report

messageRequest method 'DELETE' not supported

descriptionThe specified HTTP method is not allowed for the requested
resource (Request method 'DELETE' not supported).

I'm having this code (the following is just a fragment, if needed more
please ask!):

var saveStrategy = new OpenLayers.Strategy.Save();
saveStrategy.events.register('success', null, saveSuccess);
saveStrategy.events.register('fail', null, saveFail);

function saveSuccess(event) {
alert('Changes saved');
}
function saveFail(event) {
alert('Error! Changes not saved');
}

function dataLoaded(event) {
map.zoomToExtent(event.object.getDataExtent());
}

pdv = new OpenLayers.Layer.Vector("Puntos de Venta", {
styleMap: myStyles,
eventListeners: {
"featuresadded": dataLoaded
},
strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],
protocol: new OpenLayers.Protocol.HTTP({
url:
"http://server:port/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=GestionComercial:pdv_new&maxFeatures=1000&outputFormat=json",
format: new OpenLayers.Format.GeoJSON({
ignoreExtraDims: true
})
})
});
map.addLayer(pdv);


-----
just another web developer
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/messageRequest-method-DELETE-not-supported-tp5123405p5123405.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
giraam
2010-06-01 14:32:29 UTC
Permalink
Another information is that I'm using GeoServer 2.0.1 deployed at a Glassfish
2.1.1

Thanks in advance for your help!

Gilberto Ramos

-----
just another web developer
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/messageRequest-method-DELETE-not-supported-tp5123405p5126266.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Frank Broniewski
2010-06-01 14:57:49 UTC
Permalink
Post by giraam
Another information is that I'm using GeoServer 2.0.1 deployed at a Glassfish
2.1.1
Thanks in advance for your help!
Gilberto Ramos
-----
just another web developer
Hi,

I don't think this is an OL issue, your server does not understand the
"DELETE" request ... so you may need to look there for help. Or you can
patch the Format.GeoJSON to use another type of request for DELETEs


Frank
--
Frank BRONIEWSKI

METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN

tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
giraam
2010-06-01 15:42:50 UTC
Permalink
I agree! I'm new to GIS so I'm having problems that probably are basics..

I'm reading my vector layer from

/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=GestionComercial:pdv_new&maxFeatures=1000&outputFormat=json

but this is just the result of a query so maybe when I try to save changes,
OL tries to persist the new stuff exactly there, at that URL.
The thing here is that I don't have a clue where and how to point the new
data in order to persist them!

I've read lot of examples but they just give some code and so few
explanation of what it does.

Nobody else with some tips? =)

Thank you!

-----
just another web developer
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/messageRequest-method-DELETE-not-supported-tp5123405p5126644.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
c***@nokia.com
2010-06-01 15:50:16 UTC
Permalink
Post by giraam
I agree! I'm new to GIS so I'm having problems that probably are basics..
I'm reading my vector layer from
/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=GestionComercial:pdv_new&maxFeatures=1000&outputFormat=json
but this is just the result of a query so maybe when I try to save changes,
OL tries to persist the new stuff exactly there, at that URL.
The thing here is that I don't have a clue where and how to point the new
data in order to persist them!
You're using an HTTP Protocol to try to talk to a WFS. You need to be using
a WFS Protocol to talk to a WFS. I can't help with that, but maybe that will
help you get pointed in the right direction.

Regards,
--
Christopher Schmidt
Nokia
giraam
2010-06-01 16:35:19 UTC
Permalink
You gave me exactly the tip I needed! I'll taking a look at WFS Protocol..!

Thank you very much for your help people..!

If I solve the problem I'll post it in here.

-----
just another web developer
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/messageRequest-method-DELETE-not-supported-tp5123405p5126884.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Ryan Williams
2010-06-01 18:08:45 UTC
Permalink
Hi all,

I know similar questions have been asked, but after searching for most
of the morning I have yet to find an answer that I can get to work.

I'm trying to make this work: Geoserver 2.0-SNAPSHOT is on one server
with it's own domain; Our web server is on a different server in a
different domain.
My page is html with OpenLayers 2.9 and other JavaScript and it is
served up by the web server (call it dev.mapping.com/maps.html).
I'm able to display map images and legends from Geoserver and
GeoWebCache, but when I attempt a WMS GetFeatureInfo request I receive a
blank popup and firefox reports: "401 Full Authentication is required to
access this resource"

Now, I think this is due to the 'Same Origin Policy' and I may be able
to setup a proxy to get around this.

So, is this a situation where adding "dev.mapping.com" to the permitted
hostnames in the Geoserver Proxy Administration UI should make this work?
Do I need to be setting the OpenLayers.ProxyHost variable? (I realize
this is an OpenLayers question)
Is this something that needs to be setup on the web server instead?

I've tried adding the hostname to the permitted hostnames in the
Geoserver UI and haven't seen any changes. Am I completely
misunderstanding what this proxy config is for?

Thanks for any ideas,
Ryan
--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
***@paqinteractive.com
c***@nokia.com
2010-06-01 18:17:13 UTC
Permalink
Post by Ryan Williams
Hi all,
I know similar questions have been asked, but after searching for most
of the morning I have yet to find an answer that I can get to work.
I'm trying to make this work: Geoserver 2.0-SNAPSHOT is on one server
with it's own domain; Our web server is on a different server in a
different domain.
My page is html with OpenLayers 2.9 and other JavaScript and it is
served up by the web server (call it dev.mapping.com/maps.html).
I'm able to display map images and legends from Geoserver and
GeoWebCache, but when I attempt a WMS GetFeatureInfo request I receive a
blank popup and firefox reports: "401 Full Authentication is required to
access this resource"
Now, I think this is due to the 'Same Origin Policy' and I may be able
to setup a proxy to get around this.
This is incorrect. A 401 error is not issued because of a Same Origin Policy
violation. Instead, the request will simply not work/cause an error.

Possibly, this is happening because the relative resource to dev.mapping.com
is actually protected: If you're requesting "/foo/wms/bar", and the URL
on dev.mapping.com is protected by some kind of auth, that could be your
problem, but without seeing your code I can't really imagine how this would
be without you knowing it.
Post by Ryan Williams
So, is this a situation where adding "dev.mapping.com" to the permitted
hostnames in the Geoserver Proxy Administration UI should make this work?
Generally, GeoServer would only be able to proxy requests *out* from
geoserver.example.com -- not requests from remote.example.com *to*
geoserver.example.com. So unless something special is going on here that
I can't picture, I don' think so.
Post by Ryan Williams
Do I need to be setting the OpenLayers.ProxyHost variable?
Probably.
Post by Ryan Williams
(I realize
this is an OpenLayers question)
Is this something that needs to be setup on the web server instead?
The web server that is serving your HTML pages, yes.
Post by Ryan Williams
I've tried adding the hostname to the permitted hostnames in the
Geoserver UI and haven't seen any changes. Am I completely
misunderstanding what this proxy config is for?
I have never used GeoServer, but I think the answer is still yes.

Regards,
--
Christopher Schmidt
Nokia
Ryan Williams
2010-06-01 18:28:16 UTC
Permalink
Sorry everyone, that should have gone to the ***@geoserver.org instead
of @openlayers....
Thanks for you're response though, it is helpful

Ryan
Post by c***@nokia.com
Post by Ryan Williams
Hi all,
I know similar questions have been asked, but after searching for most
of the morning I have yet to find an answer that I can get to work.
I'm trying to make this work: Geoserver 2.0-SNAPSHOT is on one server
with it's own domain; Our web server is on a different server in a
different domain.
My page is html with OpenLayers 2.9 and other JavaScript and it is
served up by the web server (call it dev.mapping.com/maps.html).
I'm able to display map images and legends from Geoserver and
GeoWebCache, but when I attempt a WMS GetFeatureInfo request I receive a
blank popup and firefox reports: "401 Full Authentication is required to
access this resource"
Now, I think this is due to the 'Same Origin Policy' and I may be able
to setup a proxy to get around this.
This is incorrect. A 401 error is not issued because of a Same Origin Policy
violation. Instead, the request will simply not work/cause an error.
Possibly, this is happening because the relative resource to dev.mapping.com
is actually protected: If you're requesting "/foo/wms/bar", and the URL
on dev.mapping.com is protected by some kind of auth, that could be your
problem, but without seeing your code I can't really imagine how this would
be without you knowing it.
Post by Ryan Williams
So, is this a situation where adding "dev.mapping.com" to the permitted
hostnames in the Geoserver Proxy Administration UI should make this work?
Generally, GeoServer would only be able to proxy requests *out* from
geoserver.example.com -- not requests from remote.example.com *to*
geoserver.example.com. So unless something special is going on here that
I can't picture, I don' think so.
Post by Ryan Williams
Do I need to be setting the OpenLayers.ProxyHost variable?
Probably.
Post by Ryan Williams
(I realize
this is an OpenLayers question)
Is this something that needs to be setup on the web server instead?
The web server that is serving your HTML pages, yes.
Post by Ryan Williams
I've tried adding the hostname to the permitted hostnames in the
Geoserver UI and haven't seen any changes. Am I completely
misunderstanding what this proxy config is for?
I have never used GeoServer, but I think the answer is still yes.
Regards,
--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
***@paqinteractive.com
Ryan Williams
2010-06-03 15:10:59 UTC
Permalink
Hello all,
I'd sent out a question earlier this week about using a proxy
server with openlayers, so that I could make WMSGetFeatureInfo requests
to a Geoserver WMS running on another domain.
I got a response here and another on the Geoserver users group that were
both helpful and have the proxy working EXCEPT when i try to make a
request on a layer that requires authentication.
Seems that the proxy.cgi isn't setup to handle a 401 response from the
server. I've tried editing the python code in the proxy.cgi that comes
with OpenLayers but haven't come up with a solution that will handle
this 401 response from the server I'm using the proxy to get to.

Does anyone have a good example of a proxy that handles 401 responses
from the server?

By the time I make the WMSGetFeatureInfo request using the proxy,
Geoserver has already asked the user for their credentials and Apache
has asked the user for their credentials. I just need to know how to
pass one of those credentials along to the proxy and include it in an
Authorization: header

Thanks,
Ryan

"You can set up a cgi script that will proxy
(one comes with openlayers). You can then point OpenLayers.ProxyHost at
it. Keep in mind that the script does not ship as an open proxy (afaik)
so you would have to modify it to proxy for whatever host/domain your
GeoServer instance is on. - Justin Deoliveira"
Post by Ryan Williams
Thanks for you're response though, it is helpful
Ryan
Post by c***@nokia.com
Post by Ryan Williams
Hi all,
I know similar questions have been asked, but after searching for most
of the morning I have yet to find an answer that I can get to work.
I'm trying to make this work: Geoserver 2.0-SNAPSHOT is on one server
with it's own domain; Our web server is on a different server in a
different domain.
My page is html with OpenLayers 2.9 and other JavaScript and it is
served up by the web server (call it dev.mapping.com/maps.html).
I'm able to display map images and legends from Geoserver and
GeoWebCache, but when I attempt a WMS GetFeatureInfo request I receive a
blank popup and firefox reports: "401 Full Authentication is required to
access this resource"
Now, I think this is due to the 'Same Origin Policy' and I may be able
to setup a proxy to get around this.
This is incorrect. A 401 error is not issued because of a Same Origin Policy
violation. Instead, the request will simply not work/cause an error.
Possibly, this is happening because the relative resource to dev.mapping.com
is actually protected: If you're requesting "/foo/wms/bar", and the URL
on dev.mapping.com is protected by some kind of auth, that could be your
problem, but without seeing your code I can't really imagine how this would
be without you knowing it.
Post by Ryan Williams
So, is this a situation where adding "dev.mapping.com" to the permitted
hostnames in the Geoserver Proxy Administration UI should make this work?
Generally, GeoServer would only be able to proxy requests *out* from
geoserver.example.com -- not requests from remote.example.com *to*
geoserver.example.com. So unless something special is going on here that
I can't picture, I don' think so.
Post by Ryan Williams
Do I need to be setting the OpenLayers.ProxyHost variable?
Probably.
Post by Ryan Williams
(I realize
this is an OpenLayers question)
Is this something that needs to be setup on the web server instead?
The web server that is serving your HTML pages, yes.
Post by Ryan Williams
I've tried adding the hostname to the permitted hostnames in the
Geoserver UI and haven't seen any changes. Am I completely
misunderstanding what this proxy config is for?
I have never used GeoServer, but I think the answer is still yes.
Regards,
--
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
***@paqinteractive.com
Loading...