<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks Gerald for the valuable comments. You are right, setting "generated_file" to « /tmp/outFile.tif » creates a valid URL in WPS execute response. But setting it to « outFile.tif » (which should not be done in the first case), makes me believe that the logic to construct output URL is as follows:<div><br></div><div>OutputURL = tmpUrl + '/' + drop the first "n" characters from value of "generated_file", where n=length of value of tmpPath</div><div><br></div><div>So setting <span style="font-size: 12pt;">"generated_file" to </span><span style="font-size: 12pt;">« outFile.tif » and having "tmpPath =/tmp" (n=4) gives output URL as </span></div><div><a href="http://192.168.3.86/zoo/le.tif" target="_blank">http://192.168.3.86/zoo/ile.tif</a></div><div><br></div><div><div>and setting <span style="font-size: 12pt;">"generated_file" to </span><span style="font-size: 12pt;">« outFile.tif » and having "tmpPath =/tmp/" (n=5 with additional slash) gives output URL as </span></div><div><a href="http://192.168.3.86/zoo/le.tif" target="_blank">http://192.168.3.86/zoo/le.tif</a></div></div><div><br></div><div><span style="font-size: 12pt;">I did not check the source code constructing the output URL, but is this how WPS kernel constructs the URL? May be it is not checking if the file actually exists as per the constructed URL or may be it not the responsibility of WPS kernel to check if the file exists as per output URL.</span></div><div><br></div><div>In my use case, as there will be hundreds of WPS requests from several users, we decided not to generate all the outputs under /tmp. Instead the output is generated under /wps-vm/jobs/<job-id></div><div><br></div><div>e.g: /wps-vm/jobs/1234/outFile.tif</div><div><br></div><div>As the first 'n' characters are chopped from the genenrated_file, as a workaround, i am appending "n" extra dummy characters at the beginning of the generated_file, so that the outputURL stays like </div><div><a href="http://192.168.3.86/zoo/" target="_blank">http://192.168.3.86/zoo/</a><span style="font-size: 12pt;">wps-vm/jobs/1234/outFile.tif</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Hope this is clear.</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Thanks</span></div><div><span style="font-size: 12pt;">Rakesh</span></div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div> <br><br><div>> Subject: Re: [Zoo-discuss] tmpPath and tmpUrl<br>> From: gerald.fenoy@geolabs.fr<br>> Date: Tue, 28 Jun 2016 12:13:40 +0200<br>> CC: zoo-discuss@lists.osgeo.org<br>> To: rakeshuk@outlook.com<br>> <br>> Dear Rakesh,<br>> sorry for late reply.<br>> <br>> I am not sure to understand the issue here. May I ask, if you have set your generated_file to « /tmp/outFile.tif » as it should be ?<br>> In case you have used outFile.tif, then, the ZOO-Kernel will be unable to find the file.<br>> <br>> I hope this helps.<br>> <br>> Best regards,<br>> <br>> > Le 24 juin 2016 à 17:00, rakesh prithiviraj <rakeshuk@outlook.com> a écrit :<br>> > <br>> > Hi,<br>> > <br>> > I have the following config in my main.cfg file.<br>> > <br>> > tmpPath=/tmp/<br>> > tmpUrl = http://192.168.3.86/zoo<br>> > <br>> > I also have a WPS service that creates output product outfile.tif in /tmp. In the service configuraion, asReference is set to true and in the service, I am using "generated_file" key to point to the output file.<br>> > <br>> > After the service execution, in the WPS response I am getting the URL of the file as<br>> > <br>> > http://192.168.3.86/zoo/le.tif<br>> > <br>> > the first 5 characters of the outfile name is dropped. If I change the parameter tmpPath from /tmp/ (5 characters) to /tmp (4 characters), I am getting http://192.168.3.86/zoo/ile.tif in the WPS response as URL. It looks like the length of value of tmpPath has impact on the response URL. I would expect http://192.168.3.86/zoo/outFile.tif as the response.<br>> > <br>> > could you please let me know how to fix this?<br>> > <br>> > regards<br>> > Rakesh <br>> > _______________________________________________<br>> > Zoo-discuss mailing list<br>> > Zoo-discuss@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/zoo-discuss<br>> <br>> <br>> <br>> Gérald Fenoy<br>> http://wiki.osgeo.org/wiki/User:Djay<br>> <br></div></div> </div></body>
</html>