[Zoo-discuss] BufferPy problem

Farkas H farkas.dus at gmail.com
Sun Jan 13 14:37:28 PST 2013


Hi Gérald,

thanks for your answer.
With changeset 389 all mentioned Python requests are ok. Thank you very much.


Concerning the Post request I do the following.
I have a xml file containing a http-Post request [1]. I send this Post
request via curl to the server and get a correct response.
Please find the log file here [2] and the apache log file here [3].

Than I simply assign the content of the xml file with the Post request
to the data variable in the JavaScript file (I've removed the carriage
returns).
...
data: 'content of the xml file with the Post request from above',
...

Than I send the Post request embedded in the JavaScript file to the server.

The status in the apache log file is OK, 200 [4].
However the request method in the apache log file is OPTIONS and the
number of bytes sent to the client is less (531 vs. 1390).

Do you have any idea?
Hope to hear from you.

Regards,
Farkas


[1] ======
<wps:Execute service="WPS" version="1.0.0"
xmlns:wps="http://www.opengis.net/wps/1.0.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
<ows:Identifier>BufferPy</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>InputPolygon</ows:Identifier>
<ows:Title>water bodies</ows:Title>
<wps:Reference xlink:href="http://demo.opengeo.org/geoserver/ows?Request=GetFeature&Service=WFS&Version=1.0.0&Typename=topp:states"/>
</wps:Input>
<wps:Input>
<ows:Identifier>BufferDistance</ows:Identifier>
<ows:Title>Emergency area.</ows:Title>
<wps:Data>
<wps:LiteralData>0.01</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:ResponseDocument storeExecuteResponse="false">
<wps:Output asReference="true">
<ows:Identifier>Result</ows:Identifier>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>


[2]   ======
* About to connect() to localhost port 80
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 80
> POST /cgi-bin/zoo_loader.cgi HTTP/1.1
> User-Agent: curl/7.15.1 (i386-pc-win32) libcurl/7.15.1 OpenSSL/1.0.1c zlib/1.2.3
> Host: localhost
> Accept: */*
> content-type: text/xml
> Content-Length: 1040
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
HTTP/1.1 200 OK
< Date: Sun, 13 Jan 2013 22:09:34 GMT
< Server: Apache/2.2.14 (Win32)
< Transfer-Encoding: chunked
< Content-Type: text/xml; charset=UTF-8
* Connection #0 to host localhost left intact
* Closing connection #0


[3] ======
127.0.0.1 - - [13/Jan/2013:23:09:34 +0100] "POST
/cgi-bin/zoo_loader.cgi HTTP/1.1" 200 1390


[4] ======
127.0.0.1 - - [13/Jan/2013:23:06:42 +0100] "OPTIONS
/cgi-bin/zoo_loader.cgi HTTP/1.1" 200 531



On 13 January 2013 20:50, Gérald Fenoy <gerald.fenoy at geolabs.fr> wrote:
> Hi Farkas,
> I forgot to say in my previous email that using rev. 389 should solve issue using UnionPy service.
>
> I'm not sure to follow what happen when you use POST request. Did you try using curl tool from command line with -v option to get a verbose output ? If yes, what was the output ? I guess it would be helpful for testing your ZOO-Kernel version and make sure it can handle properly the POST requests to run curl from command line.
>
> Did you take a look at the Apache error log ? Maybe there is some user privileges issue due to running zoo_loader.cgi from the command line using another user (which make some files owned by this user).
>
> It would be helpful to get more details on what is not working what is exactly the XML request you are using to request the ZOO-Kernel.
>
> I hope you can provide more details.
>
> Waiting for your answer,
> Best regards,
>
>
>
> Gérald Fenoy
> gerald.fenoy at geolabs.fr
>
>
> Le 13 janv. 2013 à 20:43, Farkas H <farkas.dus at gmail.com> a écrit :
>
>> Firebug reports that parsing the xml causes an error [2] when
>> processing the JavaScript via http-Post request.
>>
>> Do you have any idea?
>


More information about the Zoo-discuss mailing list