[Geoserver-users] wfs getfeature trouble

Hi,

here is my request :

http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8

it works when i call it in FireFox.. it returns all informations about my
polygon.

but in my code, i use the same request :

url =
"http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8";
OpenLayers.loadURL(url, '', this, wfsResponse);

function wfsResponse(response) {
  alert(response.responseText);
}

the alert return me a different response, well constructed but with no
data...
firebug give me the same reponse (almost null) when i spy on it...

why the 2 responses are different... i cannot get the feature properly to
highlight it..

any idea ?

thanks for your help
--
View this message in context: http://www.nabble.com/wfs-getfeature-trouble-tp21431142p21431142.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

floflo ha scritto:

Hi,

here is my request :

http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8

it works when i call it in FireFox.. it returns all informations about my
polygon.

but in my code, i use the same request :

url =
"http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8";
OpenLayers.loadURL(url, '', this, wfsResponse);

function wfsResponse(response) {
  alert(response.responseText);
}

the alert return me a different response, well constructed but with no
data... firebug give me the same reponse (almost null) when i spy on it...

why the 2 responses are different... i cannot get the feature properly to
highlight it..

any idea ?

Hum, a couple:
* firefox usually fixes unproperly url-encoded params before sending
   the requests, the javascript code does not.
   However, this does not seem your specific case
* javascript code can only call back the server where it originated
   from, that is, same ip and same port. So if your javascript is
   being served by apache you have to proxy geoserver so that it
   looks like it is sitting on the same port.
   Alternatively, in the GeoServer data directory there is a folder
   named "www" where you can put static files that will be published
   at http://host:port/geoserver/www

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Ok, it's because the command :
OpenLayers.loadURL(url, '', this, wfsResponse);

adds a '?' a the end of the query... because the paremeter "paremeter" is
set to ''
so be sure you fixed parameters to null if you already set parameters in
your url..

thks

floflo wrote:

Hi,

here is my request :

http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8

it works when i call it in FireFox.. it returns all informations about my
polygon.

but in my code, i use the same request :

url =
"http://172.31.172.244:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typename=bluecham:communes&FEATUREID=communes.8";
OpenLayers.loadURL(url, '', this, wfsResponse);

function wfsResponse(response) {
  alert(response.responseText);
}

the alert return me a different response, well constructed but with no
data...
firebug give me the same reponse (almost null) when i spy on it...

why the 2 responses are different... i cannot get the feature properly to
highlight it..

any idea ?

thanks for your help

--
View this message in context: http://www.nabble.com/wfs-getfeature-trouble-tp21431142p21472477.html
Sent from the GeoServer - User mailing list archive at Nabble.com.