Select to view content in your preferred language

Cannot Edit Using Javascript API Sample

1818
12
02-10-2013 01:57 AM
junespina
Emerging Contributor
Hi,

Our organization is trying to implement a simple web editing mapping application using the Javascript API sample on the ArcGIS Resource Center. This is what we did.
a. We Downloaded the application
b. Edited the snippet for defining the Center
c. Add our feature service layer published through our ArcGIS Server
d. We also downloaded the ASP.NET proxy page and modified it per instructions from the resource center.

we noticed that the sample works (Editing) only when it is not downloaded. But when we downloaded it, the editing feature seems to be disabled...

Any Ideas?

Thanks in advance...

Jun
0 Kudos
12 Replies
RahulMetangale1
Frequent Contributor
For editing feature services are required (available from ArcGIS Server 10.1) Does the url you are using for editing have "FeatureServer" word in it? for example:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0

If you are using feature service please use fiddler or firebug to track the request sent to the server.
0 Kudos
JohnGravois
Deactivated User
Rahul/Jun,

Feature services have been available since 10.0, they were not added in 10.1.  Please check "What's New" in REST for more information.

Jun,
are you certain you updated the line of code in the application which defines the location of your new proxy?
are you hosting your application over http?

i would recommend continuing to test with our sample service before substituting your own layers.
0 Kudos
junespina
Emerging Contributor
Rahul/jgravois

first of all thank you for the response

Rahul,

Yes we are using a feature service for editing. it actually works fine with the out of the box ArcGIS Server Application.

jgravois

We made sure that the proxy URL points to the proxy page. We are not actually sure if we need to create a proxy page, but we did it anyway. We tried running the sample in our server as-is without changing any snippet. The Editing function does not work...

jun
0 Kudos
RahulMetangale1
Frequent Contributor
jgravois thanks for correction. That was a big typo from my side.

Jun,

Can you use fiddler and firebug to track the request sent to feature service. That will help narrow down the issue.

Screen shot would help.
0 Kudos
DianaBenedict
Frequent Contributor
Jun

What version of SDE is your data stored that you are using for your feature services?  At one point I was unable to edit feature services that pointed to data that was stored in ArcSDE 9.3.1 database.  I do not know if this is a "feature" of ArcGIS 10.1 or if it has been addressed in the new SP release (didn't really address it since we were moving all databases over any way).  In any case, my edits would not work until I pointed my feature services to data that was stored in ArcSDE 10.0 or greater.
0 Kudos
junespina
Emerging Contributor
Rahoul

I haven't tried Firebug before so I'm not really sure if I'm doing the right thing. here is the snap shot of the result of the Firebug Inspection... please find attached image.

[ATTACH=CONFIG]21735[/ATTACH]

Diana

We are using SDE version 10

Thanks for the reply guys...

Jun
0 Kudos
junespina
Emerging Contributor
Hello,

Its been days, since i've posted this thread, at our end we tried doing everything from step 1. unfortunately the edit function still doesn't work...and its getting to be a bit frustrating...

can i ask, is there anyone who actually used the Javascript API sample, particularly the edit function, that worked?

I hope the guys from ESRI from the javascript department would help...thanks


Jun
0 Kudos
AdrianMarsden
Honored Contributor
Yes - we use it fine - after creating a brand new Enterprise 10.1 database - that was what was holding me back.  Ensure that the account you use in the MXD. Service has the required rights and that they are being passed through OK.  Set AGS logging to debug and take a look at everything that may be relevant (you may see failed attempts to edit or bad logins) - if you are using MS SQL switch on all the logging tools there to see if there are any failed write attempts.

Sacrifice the relevant amount of small furry animals to the dark gods.

Good luck

ACM
0 Kudos
RahulMetangale1
Frequent Contributor
Jun,

I am suspecting that proxy file path is not correct or it is not configured properly.
1. How are you setting proxy path. I would suggest you give absolute path ex: http://<link to proxy.ashx/jsp>
2. To confirm if proxy is setup correctly you can try following link:
http://<path to proxy.ashx/jsp>?http://www.google.com

If you can see google page then you can be sure that proxy is setup correctly.

Rahul
0 Kudos