[OpenLayers-Users] free proxy wfs
Mario Nuñez Jimenez
mario.nunez at atos.net
Mon Dec 16 02:19:30 PST 2013
Thank you for your help.
I am using:
var wfs = new OpenLayers.Layer.Vector("wfs", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:900913",
url: "http://demo.opengeo.org/geoserver/wfs",
featureType: "states",
featureNS: "http://www.openplans.org/topp"
}),
styleMap: styleMap
});
//This one works without proxy definition in my server
var wfs2 = new OpenLayers.Layer.Vector("wfs2", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:900913",
// url: "http://icarus.es.atos.net:8080/geoserver/icarus/wfs",
url: "http://icarus.es.atos.net/cgi-bin/moia",
featureType: "planet_osm_line",
featurePrefix: "icarus",
geometryName: "way",
featureNS: "http://icarus.es.atos.net"
}),
styleMap: styleMap
});
//This one doesn’t work unless there is a proxy running on my server (regardless of using geoserver or mapserver WFS url)
So I will research about how to make my geoserver/mapserver to answer with JSONP, but anyway there is need of write a different openlayers javascript code to use the wfs configured that way?
Cheers,
Mario.
From: Mark Prins [mailto:mc.prins at gmail.com]
Sent: lunes, 16 de diciembre de 2013 11:02
To: Mario Nuñez Jimenez
Cc: openlayers-users
Subject: Re: [OpenLayers-Users] free proxy wfs
2013/12/16 Mario Nuñez Jimenez <mario.nunez at atos.net>
Dear list,
I am wondering why there are WFS that doesn’t need a proxy to work.
it's not the WFS that needs the proxy, it's your browser that needs a proxy (and that needs to run on the origin of your webapplication); only if you manage to break the browser's security sandbox with regard to X-domain Http Request (XHR) you will not need a proxy.. (not recommended)
If you can get your WFS to produce json as a response format you may be able to use JSONP (and stay outside the XHR sandbox) in your application (you would probably need to re-write the controls that issue the WFS requests though).
I tried in my openlayers web application:
http://demo.opengeo.org/geoserver/wfs
And it works without having any proxy configuration, but to use services built by me with mapserver or geoserver I had to configure a python proxy to avoid cross domain issues.
I doubt this is true; I think you will find that all the examples running on openlayers.org use the proxy at http://openlayers.org/dev/examples/proxy.cgi eg. http://openlayers.org/dev/examples/proxy.cgi?url=http%3A%2F%2Fdemo.opengeo.org%2Fgeoserver%2Fwfs
What is the difference between that service and mine?
this hard to tell without your service.
How could I deploy a working proxy free WFS?
host your WFS inside/as part of your webservice hosting your application (same base url)
eg: http//yourwebhost/webapp/ and http//yourwebhost/wfs/
Is that possible?
Any help will be much appreciated.
Thank you in advance.
Cheers,
Mario Núñez Jiménez
GEO Lab
Transport, Turism and Environment Sector
Public, Health and Transport Market
AtoS Research & Innovation
C/ Albarracín, 25 - 28037 Madrid (Spain)
T +34 912148100 <tel:%2B34%20912148100>
F +34 917543252 <tel:%2B34%20917543252>
mario.nunez at atos.net <mailto:mario.nunez at atos.net>
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged.
oops; this is no longer confidential..
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
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.
Este mensaje y los ficheros adjuntos pueden contener informacion confidencial
destinada solamente a la(s) persona(s) mencionadas anteriormente
pueden estar protegidos por secreto profesional.
Si usted recibe este correo electronico por error, gracias por informar
inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
no se hace responsable por su contenido. Su contenido no constituye ningun
compromiso para el grupo Atos, salvo ratificacion escrita por ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus.
------------------------------------------------------------------
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Disclaimer;
This message is just a reflection of what I thought at the time of sending. The message may contain information that is not intended for you or that you don't understand.
------------------------------------------------------------------
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
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.
Este mensaje y los ficheros adjuntos pueden contener informacion confidencial
destinada solamente a la(s) persona(s) mencionadas anteriormente
pueden estar protegidos por secreto profesional.
Si usted recibe este correo electronico por error, gracias por informar
inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
no se hace responsable por su contenido. Su contenido no constituye ningun
compromiso para el grupo Atos, salvo ratificacion escrita por ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus.
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131216/b1a21150/attachment-0001.html>
More information about the Users
mailing list