Select to view content in your preferred language

Do layers in a feature service have to be versioned in order to edit over the web?

3056
6
Jump to solution
12-29-2015 08:04 PM
WillHughes1
Occasional Contributor II

I am having some problems using the JS Editing samples. Features geometry changes are not being saved. After a page refresh the feature changes revert to the original size, location, etc.

Thanks.

-Will

1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi Will,

Feature classes that are published as feature services do not have to be registered as versioned.  What samples are you running into issues with?

View solution in original post

6 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Will,

Feature classes that are published as feature services do not have to be registered as versioned.  What samples are you running into issues with?

WillHughes1
Occasional Contributor II

Move and edit vertices | ArcGIS API for JavaScript

and

Editor widget | ArcGIS API for JavaScript

I setup and tested the proxy.ashx page which appears to be working.

The only error I am seeing (in the console) on creating features is a syntax error but with no error code.

It appears that edits are being made to the database since I can move features (polygons) and update attributes, but as soon as I pan the map or refresh the page, the changes disappear.

database: oracle

AGS: 10.2

JSAPI: 3.15

Data is published with schema owner connection and feature service (Feature Access) selected with options checked to add, update, delete, etc.

Thanks.

Will

JonathanQuinn
Esri Notable Contributor

What is the JSON response of the edit request?  I'd imagine that the application makes it seem like the edit is going through, but the request fails at the Rest API.  If the request is actually failing, the response should show the error in JSON.  You can also take a look at the Server logs for any indication of why the edit is failing.  Finally, see if you can submit the request directly at the REST endpoint to eliminate any application level issues.

WillHughes1
Occasional Contributor II

Not sure how to check the JSON response, unless you are referring to the response in the console. The message in the console is "syntax error" with no error code.

[object Error]{description: "Syntax error", log: undefined, message: "Syntax error", name: "SyntaxError", number: -2146827286}

I have successfully tested deletes and attribute updates at rest endpoint.

Is there a way I can test a simple delete from the javascript application? I have a feeling that the proxy is the cause.

Thanks.

0 Kudos
WillHughes1
Occasional Contributor II

Finally solved this problem by changing the feature service rest endpoint url to the web adaptor Url. Http over 6080 was the problem.

Working great now!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Will,

   Just to add to Jakes reply. Here is the documentation link to Authoring Feature Services

Author feature services—Documentation (10.3 and 10.3.1) | ArcGIS for Server

Versioned and nonversioned geodatabase data is supported. Esri recommends you use nonversioned in feature services, because nonversioned data scales better for editing. There are some nonsimple data types (for example, network edges), however, that must be versioned for you to edit them through a feature service.