Edit through applyEdits ArcGIS Server service instead of custom service.