Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have the following geoprocessing post request:

<wps:Execute xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0    http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>gs:BufferFeatureCollection</ows:Identifier>
 <wps:DataInputs>
   <wps:Input>
    <ows:Identifier>features</ows:Identifier>
    <wps:Reference mimeType="text/xml; subtype=wfs-collection/1.0" xlink:href="http://geoserver/wfs" method="POST">
    <wps:Body>
      <wfs:GetFeature xmlns:medford="http://medford.opengeo.org" service="WFS" version="1.0.0" outputFormat="GML2">
      <wfs:Query typeName="medford:firestations"/>
      </wfs:GetFeature>
    </wps:Body>
   </wps:Reference>
  </wps:Input>
  <wps:Input>
    <ows:Identifier>distance</ows:Identifier>
    <wps:Data>
     <wps:LiteralData>0.024</wps:LiteralData>
    </wps:Data>
  </wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
  <wps:RawDataOutput mimeType="text/xml; subtype=wfs-collection/1.0">
  <ows:Identifier>result</ows:Identifier>
 </wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>

How can I transform it to get request?

Thanks!

share|improve this question

1 Answer 1

What are you actually trying to achieve here? If you would like to make a this WPS (web processing service) request to the server, then you will need to use a POST action. There is a fairly important difference between POST and GET actions (see HTTP/1.1 Method Definitions) and although in some cases the handlers are incorrectly implemented on the server side according to these specifications, it's best to use the correct one. In this case, you should be using a POST.

Unlike a GET request which you can easily create from within your request url, it's a little more tricky to create a POST request.

You could use curl to create the request, as shown at the botton of the page at http://docs.geoserver.org/stable/en/user/extensions/wps/processes.html, or use the Request Builder as recommended by Geoserver. If you have any experience using Python, then I wrote a request script for a similar query on WFS POST requests (https://gist.github.com/guychisholm/3905362). There are also a few browser plugins which allow you to manually fire up a HTTP Post Request.

Hope this helps

share|improve this answer
    
Thank you for your replay! I m trying to execute a wps orchestration using taverna.org.uk. The problem is that I have to use a REST Service using Get request method and to include all the wps parameters into the url... So, I have to tranform the above post request to get. –  voimak Feb 10 '13 at 22:41
    
You can still use post requests for a REST service, although the WPS is not (yet) a RESTful service. I'm not too familiar with taverna.org.uk. What sort of control do you have over the client you are using to make the REST request. –  Guy Feb 11 '13 at 14:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.