SOE & File Uploading: possible to accept File as input parameter?

2056
1
06-21-2013 02:11 PM
SimonLeo
New Contributor III
I am working on developing a SOE service that's used to parse uploaded shapefiles from web front-end. suddenly realize that it might not be possible for SOE operation to take File as input parameter?

thinking if this is not possible, what about Geoprocessing service using ArcPy? does it take File as input? I noticed there is an Upload operation method for each GP service, but it returns an ItemId. what should I do to consume/manipulate this uploaded file in the geoprocessing methods I wrote? i.e., how to access this file based on this ItemId? then will be able to delete this file? as in my case, I only need to read the file content, don't want to leave the file on server.

any ideas on this one?

thanks for any replies!!
Tags (2)
0 Kudos
1 Reply
nicogis
MVP Frequent Contributor
I haven't tried upload file but for shapefile you can use the ArcGIS Portal REST API to generate features from a shapefile (http://www.arcgis.com/apidocs/rest/generate.html).
There is a sample here with sl: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#GenerateFeatures

However Esri upload file via rest (see attachments http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/fsaddattachment.html ) use post with a multi-part request as per IETF RFC1867.
0 Kudos