Hi list,

I didn't know where to ask this question, so I'll start here. I'm trying to 
load some data from a WFS Server (MapServer). At the biginning I used 
OpenLayers.Request.POST({url: this.onlineResource, callback: callbackFunction, 
method: 'POST', data: filter}); to load the features and it worked perfectly, 
but now, due to some architecture issues, I have to make the request over a 
proxy script made in php, but I don't get the features. I don't get any 
OpenLayers error but I get an error from MapServer:

Error:
mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE 
in the WEB section, but none was provided.

Request: 

OpenLayers.Request.POST({url: networkSettings.proxyURL + "?method=POST&url=" + 
escape(this.onlineResource) + "&data=" + filtro, callback: callbackFunction, 
method: 'POST', headers: {"Content-Type": "text/xml; charset=utf-8"}});

Web Proxy:

<?

        $strURL = @$_GET["url"];
        $strMethod = @$_GET["method"];
        $strData = @$_GET["data"];

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $strURL);
        if ($strMethod == "POST"){
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $strData);
        }
        
        $data = curl_exec($ch);
        curl_close($ch);
        
?>

In Firebug I can see all the parameters:

data    <?xml version="1.0" ?><wfs:GetFeature service="WFS" version="1.1.0" 
outputFormat="text/xml; subtype=gml/3.1.1" 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd"><wfs:Query 
typeName="RecintosSigpac"><PropertyName>msGeometry</PropertyName>  
<Filter><Or><And><PropertyIsEqualTo><PropertyName>PROVINCIA</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>MUNICIPIO</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>POLIGONO</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>PARCELA</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>RECINTO</PropertyName><Literal>1</Literal></PropertyIsEqualTo></And><And><PropertyIsEqualTo><PropertyName>PROVINCIA</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>MUNICIPIO</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>POLIGONO</PropertyName><Literal>1</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>PARCELA</PropertyName><Literal>86</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>RECINTO</PropertyName><Literal>1</Literal></PropertyIsEqualTo></And></Or></Filter>
  </wfs:Query></wfs:GetFeature>
method  POST
url     
http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&;

Am I doing something wrong with the new request??
 
 
Un saludo,
 
··················································································

David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
 
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)

··················································································
Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
··················································································
email: da...@ikt.es                                web: www.ikt.es
··················································································
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to