Re: [Geoserver-users] Running a WPS process asynchronously returns always GML format

2018-04-12 Thread fawzyb
Thanks a lot Andrea it works perfectly.

Regards,
Fawzy

--
Securely sent with Tutanota. Claim your encrypted mailbox today!
https://tutanota.com 

11. Apr 2018 20:54 by andrea.a...@geo-solutions.it 
:


> Hi,> as far as I know when you are invoking a WPS asynchronously you cannot 
> use RawDataOutput,> but have to use ResponseDocument instead (and best if you 
> ask the outputs to be linked to).> Copy/pasting an example from the web, 
> something like this:
>   > storeExecuteResponse> ="> true> ">  > status> ="> 
> true> "> >>   > asReference> ="> true> "> >> > 
> BufferedPolygon> > > Area serviced by 
> playground.> > > Area within which most users of 
> this playground will live.> > > 
> > >  
> Hope this helps
> Cheers> Andrea
> On Wed, Apr 11, 2018 at 5:32 PM,  <> faw...@tutamail.com 
> > > wrote:
>
>>   
>>
>>
>>
>> I want to run a WPS process async, I'm sending the following POST request:
>>
>> 
>>
>>
>> 
>> 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 >> " 
>> xsi:schemaLocation=">> http://www.opengis.net/wps/1.0.0 
>> >>  >> 
>> http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd 
>> >> ">
>>   geo:envelope
>>   
>>     
>>   geom
>>   
>>     
>>     
>>     
>>   
>>     
>>   
>>   
>>    
>>     
>>   result
>>     
>>    
>>   
>> 
>>
>> 
>>
>> Then I got the following response:
>> --
>> > version>> =>> "1.0">>  encoding=>> "UTF-8">> ?><>> wp>> 
>> s:ExecuteResponse>>  xmln>> s:xs>> =>> ">> http://www.w3.org/2001/XMLSchema 
>> >> ">>  xmln>> s:ows>> =>> ">> 
>> http://www.opengis.net/ows/1.1 >> ">>  
>> xmln>> s:wps>> =>> ">> http://www.opengis.net/wps/1.0.0 
>> >> ">>  xmln>> s:xlink>> =>> ">> 
>> http://www.w3.org/1999/xlink >> ">>  >> xm>> 
>> l:lang>> =>> "en">>  service=>> "WPS">>  serviceInstance=>> ">> 
>> http://localhost:6256/geoserver/ows >> 
>> ?">>  statusLocation=>> ">> 
>> http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
>>  
>> >>
>>  ">>  >> version>> =>> "1.0.0">> ><>> wp>> s:Process>>  >> wp>> 
>> s:processVersion>> =>> "1.0.0">> ><>> ow>> s:Identifier>> >  
>>   geo:envelope> ow>> s:Identifier>> ><>> ow>> s:Title>> > 
>>Envelope> ow>> s:Title>> ><>> ow>> 
>> s:Abstract>> >Returns the smallest bounding box polygon that 
>> contains >> a>>  geometry. For >> a>>  point geometry, returns the same 
>> point.> ow>> s:Abstract>> >> wp>> s:Process>> ><>> 
>> wp>> s:Status>>  creationTime=>> "2018-04-11T15:09:20.938Z">> ><>> 
>> wp>> s:ProcessAccepted>> >Process accepted.> wp>> 
>> s:ProcessAccepted>> >> wp>> s:Status>> >> wp>> s:ExecuteResponse>> 
>> >
>> 
>>
>> Then I send the following GET  request:
>> 
>> http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
>>  
>> 
>> 

Re: [Geoserver-users] Running a WPS process asynchronously returns always GML format

2018-04-11 Thread Andrea Aime
Hi,
as far as I know when you are invoking a WPS asynchronously you cannot use
RawDataOutput,
but have to use ResponseDocument instead (and best if you ask the outputs
to be linked to).
Copy/pasting an example from the web, something like this:



BufferedPolygon
Area serviced by playground.

Area within which most users of this playground will live.






Hope this helps

Cheers
Andrea

On Wed, Apr 11, 2018 at 5:32 PM,  wrote:

>
> I want to run a WPS process async, I'm sending the following POST request:
>
> 
> 
>
> 
> 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" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
> http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd";>
>   geo:envelope
>   
> 
>   geom
>   
> 
> 
> 
>   
> 
>   
>   
>
> 
>   result
> 
>
>   
> 
> 
> 
>
> Then I got the following response:
> 
> --
>
> 
> http://www.w3.org/2001/XMLSchema"; 
> xmlns:ows="http://www.opengis.net/ows/1.1"; 
> xmlns:wps="http://www.opengis.net/wps/1.0.0"; 
> xmlns:xlink="http://www.w3.org/1999/xlink"; xml:lang="en" service="WPS" 
> serviceInstance="http://localhost:6256/geoserver/ows?"; 
> statusLocation="http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
>  
> "
>  version="1.0.0">
> 
> 
> geo:envelope
> 
> 
> Envelope
> 
> 
> Returns the smallest bounding box polygon that contains a 
> geometry. For a point geometry, returns the same point.
> 
> 
> 
> 
> Process accepted.
> 
> 
> 
>
> 
> 
>
> Then I send the following GET  request:
> 
> 
> http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=
> GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
> 
> 
>
> Then I got the following response:
> 
> 
> 
> 
> geo:envelope
> Envelope
> Returns the smallest bounding box polygon that
> contains a geometry. For a point geometry, returns the same
> point.
> 
> 
> Process succeeded.
> 
> 
> 
> result
> Envelope of the input geometry
> 
> 
> 
> 
> 
> 0 0 0 10 10 10 10 0 0
> 0
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> The problem is that the geometry data is returned as GML, although in my
> 1st request I set the output mime-type to "application/json".
> If I run the same request synchronously, I got a json response correctly.
> What am I doing wrong?
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/
> userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-
> requesting-an

[Geoserver-users] Running a WPS process asynchronously returns always GML format

2018-04-11 Thread fawzyb




I want to run a WPS process async, I'm sending the following POST request:





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 " 
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 
 
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd 
">
  geo:envelope
  
    
  geom
  
    
    
    
  
    
  
  
   
    
  result
    
   
  




Then I got the following response:
--
http://www.w3.org/2001/XMLSchema " 
xmlns:ows="http://www.opengis.net/ows/1.1 " 
xmlns:wps="http://www.opengis.net/wps/1.0.0 " 
xmlns:xlink="http://www.w3.org/1999/xlink " 
xml:lang="en" service="WPS" 
serviceInstance="http://localhost:6256/geoserver/ows 
?" 
statusLocation="http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
 
"
 version="1.0.0">
geo:envelope
Envelope   
 Returns the smallest bounding box polygon that contains a geometry. For a 
point geometry, returns the same point.

Process accepted.



Then I send the following GET  request:

http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
 



Then I got the following response:

http://localhost:6256/geoserver/ows 
?" 
statusLocation="http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
 
"
 version="1.0.0">
    
    geo:envelope
    Envelope
    Returns the smallest bounding box polygon that contains a 
geometry. For a point geometry, returns the same point.
    
    
    Process succeeded.
    
    
    
    result
    Envelope of the input geometry
    
    
    
    
    
    0 0 0 10 10 10 10 0 0 
0
    
    
    
    
    
    
    



The problem is that the geometry data is returned as GML, although in my 1st 
request I set the output mime-type to "application/json". 
If I run the same request synchronously, I got a json response correctly. 
What am I doing wrong?
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Geoserver-users mailing list

Please make sure you read the following two resourc