[OpenLayers-Dev] responseText from GetFeature (WFS POST) empty with OL2.7 + Geoserver 1.7.2

Tim Schaub tschaub at opengeo.org
Tue Feb 3 16:38:28 EST 2009


Hey-

Is this on IE?

If so, can you check whether the response has an 
xmlns:xml="http://www.w3.org/XML/1998/namespace" attribute at the root?

Tim

T. Vieira wrote:
> Hi,
> 
> I've been developing over OL2.7 and Geoserver 1.6.2 and when i execute a
> GetFeature (WFS POST), the response of it comes with this information:
> 
> -> response.responseText:
>  --> <?xml version=\"1.0\" encoding=\"UTF-8\"?><wfs:FeatureCollection
> numberOfFeatures=\"7\" timeStamp=\"2009-02-02T17:15:01.389Z\"
> xsi:schemaLocation=\"http://www.xlm.pt/cadrede_gis
> http://10.112.80.32:8080/Geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=.........
> etc;
> 
> -> response.responseXML.text:
>  --> 108130.789724504 -44078.85197682108130.789724504
> -44078.851976821413701060037331900-01-01ZAntiga E7108130.789724504
> -44078.8519768290#FF990011teste108130.789724504 -44078.85197682108152.9323
> .......... etc
> 
> 
> Parsing method:
>    var doc = response.responseXML;
>   if (!doc || response.fileType!="XML") {
>            doc = OpenLayers.parseXMLString(response.responseText);
>    }
> 
> ..and all works fine.
> 
> 
> 
> I upgraded to Geoserver 1.7.2 and the result is:
> 
> -> response.responseText:
>  --> <?xml version=\"1.0\" encoding=\"UTF-8\"?><wfs:FeatureCollection
> numberOfFeatures=\"7\" timeStamp=\"2009-02-02T17:15:01.389Z\"
> xsi:schemaLocation=\"http://www.xlm.pt/cadrede_gis
> http://10.112.80.32:8080/Geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=.........
> etc; (the same output as before)
> 
> -> response.responseXML.text:
>  --> ""
> 
> The parser fails. I can't get any information of the feature.
> 
> The method "OpenLayers.parseXMLString(response.responseText);" is
> deprecated, so i tried with the new method (OpenLayers.Request.POST), but
> the responseXML.text field is still empty.
> 
> 
> Any idea what is wrong?
> 
> Thanks in advanced.
> 
> Tiago Vieira 


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Dev mailing list