ServerFolder - how to use it

5620
6
Jump to solution
12-05-2014 09:40 AM
nita14
by
Occasional Contributor III

Dear all,

I would like to access the results of my local geoprocessing service using ArcGIS Runtime for Java. I found ServerFolder class to access server folders. The constructor is ServerFolder(String name). Does anybody know what is a name? What should I pass there? I belived it should be jobid (which is also a folder on server) or gpservice url, but it does not work. Can you give my any example how to use it?

Thank you in advance,

Best Regards,

Adam

0 Kudos
1 Solution

Accepted Solutions
nita14
by
Occasional Contributor III

Resolved in Runtime 100.0.0

View solution in original post

0 Kudos
6 Replies
EricBader
Occasional Contributor III

Hi Adam,

You shouldn't have to use the ServerFolder class to retrieve the results of your GP Task.

Here is a good reference for how to execute the GP Task and get the results of the task back in your application.

Run a geoprocessing task—ArcGIS Runtime SDK for Java | ArcGIS for Developers

I hope this helps!

LukeCatania
New Contributor III

I am looking for a way to access the results so I can copy them to another location specifically to copy features and raster data from the resulting temporary scratch.gdb to another GDB.  I thought the download method of this ServerFolder or ServerFile class would help as I have not found another way to do this yet.

0 Kudos
nita14
by
Occasional Contributor III

Hi Eric,

    Suppose that my gpk file produces a GPRasterDataLayer as an output  and I do not use RMS to show the results - I have an issue with that. I would like to consume the result in my ArcGIS Runtime App. I can access the result using url, included in the json response. I do not want to use java net classes to download file which resides on my local machine. I would like to use ServerFolder class to access the output of my geoprocessing and add it as a RasterDataLayer to my application. 

0 Kudos
EricBader
Occasional Contributor III

Does this not do what you want?

ArcGISDynamicMapServiceLayer resultMapServiceLayer = new ArcGISDynamicMapServiceLayer(gp.getUrl(), jobResource); jMap.getLayers().add(resultMapServiceLayer);

0 Kudos
nita14
by
Occasional Contributor III

Hi Eric,

  I have an issue when trying to run my gpk in RMS mode. I described it here Re: ArcGIS Runtime for Java 10.2.4 - com.esri.core.io.EsriServiceException:

Thank you in advance for help

0 Kudos
nita14
by
Occasional Contributor III

Resolved in Runtime 100.0.0

0 Kudos