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

T. Vieira tvieira at xlm.pt
Wed Feb 4 04:56:08 EST 2009


Hi,

the response contains:

xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:xml=\"http://www.w3.org/XML/1998/namespace\"
xmlns:sf=\"http://www.openplans.org/spearfish\"
xmlns:ows=\"http://www.opengis.net/ows\"
xmlns:gml=\"http://www.opengis.net/gml\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\">

Tiago Vieira



Tim Schaub wrote:
> 
> 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.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 
> 

-- 
View this message in context: http://n2.nabble.com/responseText-from-GetFeature-%28WFS-POST%29-empty-with-OL2.7-%2B-Geoserver-1.7.2-tp2265638p2267944.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list