Thanks a lot Andrea it works perfectly.

Regards,
Fawzy

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

11. Apr 2018 20:54 by andrea.a...@geo-solutions.it 
<mailto: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:
> <wps:ResponseDocument>  > storeExecuteResponse> ="> true> ">  > status> ="> 
> true> "> >> <wps:Output>  > asReference> ="> true> "> >> <ows:Identifier>> 
> BufferedPolygon> </ows:Identifier>> <ows:Title>> Area serviced by 
> playground.> </ows:Title>> <ows:Abstract>> Area within which most users of 
> this playground will live.> </ows:Abstract>> </wps:Output>> 
> </wps:ResponseDocument>> </wps:ResponseForm>>  
> Hope this helps
> Cheers> Andrea
> On Wed, Apr 11, 2018 at 5:32 PM,  <> faw...@tutamail.com 
> <mailto:faw...@tutamail.com>> > wrote:
>
>>           
>>
>>
>>
>> I want to run a WPS process async, I'm sending the following POST request:
>>
>> ------------------------------------------------------------------------------------------------------------
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wps:Execute version="1.0.0" service="WPS" xmlns:xsi=">> 
>> http://www.w3.org/2001/XMLSchema-instance 
>> <http://www.w3.org/2001/XMLSchema-instance>>> " xmlns=">> 
>> http://www.opengis.net/wps/1.0.0 <http://www.opengis.net/wps/1.0.0>>> " 
>> xmlns:wfs=">> http://www.opengis.net/wfs <http://www.opengis.net/wfs>>> " 
>> xmlns:wps=">> http://www.opengis.net/wps/1.0.0 
>> <http://www.opengis.net/wps/1.0.0>>> " xmlns:ows=">> 
>> http://www.opengis.net/ows/1.1 <http://www.opengis.net/ows/1.1>>> " 
>> xmlns:gml=">> http://www.opengis.net/gml <http://www.opengis.net/gml>>> " 
>> xmlns:ogc=">> http://www.opengis.net/ogc <http://www.opengis.net/ogc>>> " 
>> xmlns:wcs=">> http://www.opengis.net/wcs/1.1.1 
>> <http://www.opengis.net/wcs/1.1.1>>> " xmlns:xlink=">> 
>> http://www.w3.org/1999/xlink <http://www.w3.org/1999/xlink>>> " 
>> xsi:schemaLocation=">> http://www.opengis.net/wps/1.0.0 
>> <http://www.opengis.net/wps/1.0.0>>>  >> 
>> http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd 
>> <http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd>>> ">
>>   <ows:Identifier>geo:envelope</ows:Identifier>
>>   <wps:DataInputs>
>>     <wps:Input>
>>       <ows:Identifier>geom</ows:Identifier>
>>       <wps:Data>
>>         <wps:ComplexData mimeType="application/json">
>>             <![CDATA[
>>         {
>>   "type": "LineString",
>>   "coordinates": [
>>     [
>>       [
>>         0,
>>         0
>>       ],
>>       [
>>         10,
>>         0
>>       ],
>>       [
>>         10,
>>         10
>>       ]
>>     ]
>>   ]
>> }
>> ]]>
>>         </wps:ComplexData>
>>       </wps:Data>
>>     </wps:Input>
>>   </wps:DataInputs>
>>   <wps:ResponseForm>
>>    <wps:ResponseDocument storeExecuteResponse="true" status="true">
>>     <wps:RawDataOutput mimeType="application/json">
>>       <ows:Identifier>result</ows:Identifier>
>>     </wps:RawDataOutput>
>>    </wps:ResponseDocument>
>>   </wps:ResponseForm>
>> </wps:Execute>
>>
>> --------------------------------------------------------------------------------------------------------------------------------
>>
>> Then I got the following response:
>> --------------------------------------------------------------------------------------------------------------
>> <?xml >> version>> =>> "1.0">>  encoding=>> "UTF-8">> ?><>> wp>> 
>> s:ExecuteResponse>>  xmln>> s:xs>> =>> ">> http://www.w3.org/2001/XMLSchema 
>> <http://www.w3.org/2001/XMLSchema>>> ">>  xmln>> s:ows>> =>> ">> 
>> http://www.opengis.net/ows/1.1 <http://www.opengis.net/ows/1.1>>> ">>  
>> xmln>> s:wps>> =>> ">> http://www.opengis.net/wps/1.0.0 
>> <http://www.opengis.net/wps/1.0.0>>> ">>  xmln>> s:xlink>> =>> ">> 
>> http://www.w3.org/1999/xlink <http://www.w3.org/1999/xlink>>> ">>  >> xm>> 
>> l:lang>> =>> "en">>  service=>> "WPS">>  serviceInstance=>> ">> 
>> http://localhost:6256/geoserver/ows <http://localhost:6256/geoserver/ows>>> 
>> ?">>  statusLocation=>> ">> 
>> http://localhost:6256/geoserver/ows?service=WPS&amp;version=1.0.0&amp;request=GetExecutionStatus&amp;executionId=a07966f1-0b19-4070-bea3-2ce78ca487da
>>  
>> <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
>>  
>> <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:
>> --------------------------------------------------------------------------------------------------------------------------------
>> <wps:ExecuteResponse xml:lang="en" service="WPS" serviceInstance=">> 
>> http://localhost:6256/geoserver/ows <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
>>  
>> <http://localhost:6256/geoserver/ows?service=WPS&version=1.0.0&request=GetExecutionStatus&executionId=a07966f1-0b19-4070-bea3-2ce78ca487da>>>
>>  " version="1.0.0">
>>     <wps:Process wps:processVersion="1.0.0">
>>         <ows:Identifier>geo:envelope</ows:Identifier>
>>         <ows:Title>Envelope</ows:Title>
>>         <ows:Abstract>Returns the smallest bounding box polygon that 
>> contains a geometry. For a point geometry, returns the same 
>> point.</ows:Abstract>
>>     </wps:Process>
>>     <wps:Status creationTime="2018-04-11T15:09:20.938Z">
>>         <wps:ProcessSucceeded>Process succeeded.</wps:ProcessSucceeded>
>>     </wps:Status>
>>     <wps:ProcessOutputs>
>>         <wps:Output>
>>             <ows:Identifier>result</ows:Identifier>
>>             <ows:Title>Envelope of the input geometry</ows:Title>
>>             <wps:Data>
>>                 <wps:ComplexData mimeType="text/xml; subtype=gml/3.1.1">
>>                     <gml:Polygon srsDimension="2">
>>                         <gml:exterior>
>>                             <gml:LinearRing srsDimension="2">
>>                                 <gml:posList>0 0 0 10 10 10 10 0 0 
>> 0</gml:posList>
>>                             </gml:LinearRing>
>>                         </gml:exterior>
>>                     </gml:Polygon>
>>                 </wps:ComplexData>
>>             </wps:Data>
>>         </wps:Output>
>>     </wps:ProcessOutputs>
>> </wps:ExecuteResponse>
>> --------------------------------------------------------------------------------------------------------------------------------
>>
>> 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 
>> <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#/ 
>> <http://www.ianturton.com/talks/foss4g.html#/>
>> - The GeoServer user list posting guidelines: >> 
>> http://geoserver.org/comm/userlist-guidelines.html 
>> <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-and-integrating-new-features-and-improvements-in-GeoServer
>>  
>> <https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer>
>>
>>
>> Geoserver-users@lists.sourceforge.net 
>> <mailto:Geoserver-users@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users 
>> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>>
>>
>
>
>
> -- 
>
> Regards,
>
> Andrea Aime
>
> ==
> GeoServer Professional Services from the experts! Visit > 
> http://goo.gl/it488V <http://goo.gl/it488V>>  for more information.
> ==
>
> Ing. Andrea Aime 
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it <http://www.geo-solutions.it>
> http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>
>
>
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
> file/s allegato/i sono da considerarsi strettamente riservate. Il loro 
> utilizzo è consentito esclusivamente al destinatario del messaggio, per le 
> finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio 
> senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia 
> via e-mail e di procedere alla distruzione del messaggio stesso, 
> cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo 
> anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per 
> finalità diverse, costituisce comportamento contrario ai principi dettati dal 
> D.Lgs. 196/2003.
>
>  
>
> The information in this message and/or attachments, is intended solely for 
> the attention and use of the named addressee(s) and may be confidential or 
> proprietary in nature or covered by the provisions of privacy act 
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection 
> Code).Any use not in accord with its purpose, any disclosure, reproduction, 
> copying, distribution, or either dissemination, either whole or partial, is 
> strictly forbidden except previous formal approval of the named addressee(s). 
> If you are not the intended recipient, please contact immediately the sender 
> by telephone, fax or e-mail and delete the information in this message that 
> has been received in error. The sender does not give any warranty or accept 
> liability as the content, accuracy or completeness of sent messages and 
> accepts no responsibility  for changes made after they were sent or for other 
> risks which arise as a result of e-mail transmission, viruses, etc.
>
>
------------------------------------------------------------------------------
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-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to