Hi Christopher, 

I started making it yesterday afternoon, and I came to the end that using php 
with my PHP knowledge was definitely the problem. So I decided to make an ASP 
script, I've done things like this before, and manage to get work a standalone 
script. My source code is like this:

<%
        dim strURL, xmlhttp, strMethod, strData
        
        'Response.End
        'strURL = request.querystring("url")
        'strMethod = request.querystring("method")
        'strData = request.querystring("data")
        
        strURL = 
"http://192.168.1.65/cgi-bin/mapserv.exe?map=../htdocs/MFD/ejemplo_wfs.map&";
        strMethod = "POST"
        strData = "<?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>"

        
    Set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP")   
    xmlhttp.setTimeouts 30000,30000,30000,30000
    
    'xmlhttp.Open "GET", strURL
        xmlhttp.Open strMethod, strURL

    xmlhttp.setRequestHeader "Man", strMethod & strURL & " HTTP/1.1"
    xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
    
        xmlhttp.send(strData)
                
    If xmlhttp.Status = 200 Then             

           'response.write xmlhttp.readyState
           'response.write "--------------------"
           response.write xmlhttp.responseText
           'response.write xmlhttp.responseXML
        end if  
        
%>

But now, I can't figure out how to integrate this with OL. Should I use 
OpenLayers.Request.Post?? How?? Cuz I've try to do it but without success, 
maybe I'm doing something wrong.

My javascriot request:

OpenLayers.Request.POST({url: 
"http://192.168.1.65:8090/proxygis/proxygis.asp?";, callback: callbackFunction, 
params: {data: escape(filtro), url: escape(this.onlineResource), method: 
"POST"}});

But it doesn't even appear in Firebug the request...

Hope you can help me.

Thanks.

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: [email protected]                                web: www.ikt.es
··················································································

-----Mensaje original-----
De: [email protected] [mailto:[email protected]] 
Enviado el: martes, 22 de junio de 2010 14:46
Para: David Alda Fernandez de Lezea
CC: [email protected]
Asunto: Re: [OpenLayers-Users] Strange behaviourwithOpenLayers.Request.POSTand 
MapServer

On Jun 22, 2010, at 8:37 AM, ext David Alda Fernandez de Lezea wrote:
> The most strange thing is that I can get the data not using the proxy-script, 
> but whenever I pass through the proxy-script, there are problems.
> 
> I think that there might be the problem...

Ah. Yeah. If the same URL is working without the proxy, I would suspect the 
proxy :) I had missed that in your earlier emails.

I would recommend trying to write a standalone PHP script that successfully 
sends a request; have you done that yet? (When I say standalone, I mean 
something that doesn't take parameters from the URL; just hardcoded values).

Regards,
--
Christopher Schmidt
Nokia

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to