Problem with editing

842
7
10-17-2012 02:51 PM
BenLam
by
New Contributor
I am using ArcGIS Server 10 and in learning how to do some editing on features.

I used the following ArcGIS API for JavaScript Samples of 'Default editing widget':
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/ed_attribute_i...

The editor works perfectly on the live sample. 

However, I copied the codes into my web server, but when adding a point or line, it disappeared after finishing with double clicks. 
I am not sure why the difference as it pointed to all the same services and pages.

I had the same problem even when I used my own feature service, geometry service and a proxy page.
Did anybody has the same experience or I must have missed something.

Thanks
Ben
0 Kudos
7 Replies
CorySilva
New Contributor II
Same problem.  We must be missing something...  Have you solved it yet?
0 Kudos
JeffPace
MVP Alum
with limited info my guess:

your geometry is complicated enough that it is switching from using a get to a post, which requires a proxy, which is not set up.

You can confirm this by using firebug and looking at the error.
0 Kudos
BenLam
by
New Contributor
Thanks for the suggestion reply.

I copied every thing from the example and placed the html into my own server.  I thought it should have used its own ESRI proxy page inside the code.
However, I also have my own proxy page in my server, but no luck.

I defined my own proxy page (proxy.jsp) serverUrls variable:
String[] serverUrls = "http://server_name:8399/arcgis/rest/services"

Further suggestions are appreciated.

Thanks
0 Kudos
BenLam
by
New Contributor
Same problem.  We must be missing something...  Have you solved it yet?


I have not solved it yet.
I will inform you if I find one.

Thanks
0 Kudos
AdrianMarsden
Occasional Contributor III
Are your data in an SDE 10.x?  AS I have been informed by esri(uk) support that that is what is required to get editing via web pages to work.

ACM
0 Kudos
LeAnnBullard
New Contributor
Has anyone solved this? I am having the same issue.

Thanks!
LB
0 Kudos
JohnGravois
Frequent Contributor
here are the general steps you have to follow to set up your own editing application....

1. create a map document with sde data and start an edit session to create feature templates for editing.
2. publish the map document to arcgis server with feature access capability.
3. set up a proxy and reference it in your application after confirming that it forwards web pages.

if you are able to sketch geometries in your application, but they disappear after you double-click, then you'll need to inspect the web traffic to find the applyEdits call made to ArcGIS Server.  If a call through a proxy is bombing out entirely, you'll have to troubleshoot the problem there.  If request is submitted to the server successfully and the server is returning an error (rather than a message indicating that the edit was made successfully), then its probably time to test the operation directly at the REST endpoint to attempt to determine what is wrong.

for example, try pasting the code below into the "adds" parameter to submit a new feature to the following feature service:
http://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/FeatureServer/applyEd...

[{"geometry":{"x":34.123,"y":-117.123,"spatialReference":{"wkid":4326}},"attributes":{"pocname":"hello there!"}}]
0 Kudos