I am trying to run a geoprocessing service from the Javascript API. This service uploads a service definition to become a map service on my local server. When I run the python script within ArcCatalog, everything works fine. However, in the geoprocessing service, I get an error saying that my connection does not exist or is not supported. Does anyone have any insight as to what is going on?
Have you checked if the connection is registered on the local server ?
The ArcGIS Server connection?
Not the Arc GIS Server connection, but the message looks like you have a data connection.
Do you use a data connection one in your script ?
I do not. The only item I have is the ArcGIS Server name in the Upload Service Definition.
Anyone else see this?
This isn't exactly the most straight forward GP Service. [a service that makes a service]
It can be done, but there are some gotchas.
First, it would be good to have the exact error message, second, I'd post your script.
From the error you mention, its possible the GIS Server connection file (.ags) cannot be found. When creating your script, I'd have a folder of all the important pieces to this workflow. Inside that folder, I'd persist a .ags file with publisher credentials saved. Inside your script, you should be pointing at that folder / connection file. I'd also register that folder with the datastore. When you publish, the service should still have a reference to that folder / connection file and be able to access/use it.