ArcGISLocalFeatureLayer failure on updates

616
2
11-02-2012 06:02 AM
Labels (1)
BrianRassier
Occasional Contributor
Hello -

We have a product that currently leverages an online FeatureLayer.  This works both with the EditorWidget, and with us programmatically adding points/lines/polygons to the FeatureLayer.

We are making adjustments to allow the product to work both online and locally, but we're running into a problem.  When points/lines/polygons are added locally via the EditorWidget, it works just fine.  When multiple polygons are added to the local FeatureService programmatically, we get a very vague failure.  Using Fiddler it seems that the "applyEdits" requests are almost identical between our programmatic add and the EditorWidget add.  Any ideas why one would fail and the other wouldn't?  Any ideas how we can get a more informative failure result back?  (Note that our programmatic addition of points seems to be working fine).

Example failure response is below.  The "code" seems to change based on the session.
{
"addResults" : [{
   "success" : false,
   "error" : {
    "code" : 13561872,
    "description" : ""
   }
  }, {
   "success" : false,
   "error" : {
    "code" : 13561872,
    "description" : ""
   }
  }
],
"updateResults" : [],
"deleteResults" : []
}
0 Kudos
2 Replies
BrianRassier
Occasional Contributor
Update:
Unfortunately the ArcGISLocalFeatureLayer also does not fire the SaveEditsFailed event.  I was hoping to get a more descriptive error from this event.  It does fire the SaveEdits event, but the EndEditEventArgs don't tell me any more details than that vague service response from the orginal post.

I was also thinking this could be related to the fact that I'm programmatically adding multiple polygons where the EditorWidget only does one.  I'm guessing that isn't an issue because the EditorWidget can successfully delete multiple polygons in one request. 

Also, I am able to programmatically add a single point successfully.  Not sure why they'd be any different.  Also recall that this same polygon code does work when hitting an online service.
0 Kudos
BrianRassier
Occasional Contributor
Update:
For this specific scenario, the error was resolved by manually adding attributes for SHAPE_STArea__ and for SHAPE_STLength__.

It would still be helpful to understand why no helpful error text was returned, and why the SaveEditsFailed event never fired.  When using a remote feature service I have seen this event fire, and I've seen more helpful errors.  Is this just a difference for the local version?
0 Kudos