Am 15.12.2013 11:35, schrieb Arne Kepp:
The issue is probably that you're not encoding the parameters in
your request,
You're a prince, Arne! That did the trick!
localhost:8080/geoserver/wfs?request=getfeature&outputformat=csv&service=wfs&typename=tanzania%3ATan_regions&cql_filter=%28tanzania:REGION
like %27Tanga%27%29
Works perfectly as expected.
so you run into problems as soon as you try to use ":" or "(".
Strange enough,that the result was returned OK when I appended
&layers=tanzania:Tan_regions The CSV came back OK, regardless of the
delimiter between workspace and layer name was *not* escaped. Maybe
that helped to obscure the real problem for me....
Further the geoserver website recommends some examples:
http://docs.geoserver.org/stable/en/user/services/wfs/vendor.html
these I copied and as you see, they are *not* escaped....
To be frank: the documentation is fair at best....
http://www.php.net/manual/en/function.curl-escape.php
Is not available in PHP 5.4 as we use it in Debian 7... Announced for
5.5. So I will have to do it by hand...
If you have problems like this, you should set up a small
PHP-script that just echoes what the server receives, and then run
requests against that to spot differences in encoding etc.
I take this as a hint, that URLs sent to geoserver should *always* be
build with escaped special-chars....
Lesson learned and
Apologies for asking something, that may be obvious around here 
thanks a lot..
HZN
-Arne
On 15/12/13 02:45 , Hartmut Noack wrote:
Hello,
I am about to scream.
using this url directly in the browser:
localhost:8080/geoserver/wfs?request=getfeature&outputformat=csv&service=wfs&typename=Tan_regions&cql_filter=(tanzania:REGION
like 'Tanga')
yields exactly what I am out for. But, alas... passing it as an
CURLOPT_URL to curl in PHP gives nothing. No error, no warning
and a ZERO-result.
The difference may have something to do with the CQL-Filter.
changing the url to:
localhost:8080/geoserver/wfs?request=getfeature&outputformat=csv&service=wfs&typename=Tan_regions
makes curl return the csv as expected.
Anyway, filtering is requested and I really *would like* to
understand, why the first works in the Browser but not with curl
and the second one (without the filter) does work when sent with
curl.
Do I need to say, that in both cases the code for curl is exactly
the same?
curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch,
CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); //Collect result.
$result = curl_exec($ch); curl_close ($ch);
Please: if any body has a link to some documentation where I can
read about that issue, any hint to what is going on here would be
most appreciated....
best regards
HZN
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application
performance affects their revenue. With AppDynamics, you get 100%
visibility into your Java,.NET, & PHP application. Start your
15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application
performance affects their revenue. With AppDynamics, you get 100%
visibility into your Java,.NET, & PHP application. Start your
15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users