I'm trying to add a dynamic layer, to my map, based on a shapefile.
I created a workspace as in the image
Shapefiles are store in subfolders inside folder specified for the workspace: i.e.
But if I try to request the datalayer, it seems arcgis server (10.1) doesn't find the shapefile:
Thanks in advance.
Teresa,
Does your ArcGIS Server account have read access to the \\rover\pkt305_DB\01_UserTemporaryUpload directory?
Yes.
Teresa,
Also it looks like your JSON is not accurate:
{
"id":"Chief_Ladiga",
"source":{
"datasource":{
"type":"table",
"dataSourceName":"Chief_Ladiga",
"workspaceId":"MyShapefileWorkspaceID"
}
,"type":"dataLayer"
}
}
Notice you do not use the .shp in the dataSourceName.
The problem seems to be the subdirectory; if the shapefile is in the root directory (\\rover\pkt305_DB\01_UserTemporaryUpload) everything works fine, when I move it in a subfolder of the root folder, arcgis server generates error.
Teresa,
Using a subfolder works for me:
{
"id":"Chief_Ladiga",
"source":{
"datasource":{
"type":"table",
"dataSourceName":"folder1\\Chief_Ladiga",
"workspaceId":"MyShapefileWorkspaceID"
}
,"type":"dataLayer"
}
}
Not for me, or rather the behavior is strange: if the shapefile is saved directly into the subfolder of the root folder, arcgis server returns the error message (Unable to find the specified 'datasourceName' in 'dataSource' for dynamic DataLayer with 'id' : -1.) ; but if I save the shapefile first in the root folder, and then move it into subfolder, everything works, or perhaps simply because the rest response is in the cache. Therefore I would ask you to try the first way. Thank you for availability.
Teresa
Teresa,
I see the same issue now with sub folders. Not sure what to tell you besides call Tech Support.
Thanks anyway.
Teresa.
Are the subfolders supported in newer versions?
Did you find out something?
Thanks.
Geta