Publishing Map Service Through Geoprocessing Service

921
6
07-31-2014 12:39 PM
JoshObrecht
Occasional Contributor

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?

0 Kudos
6 Replies
BakaryKoné
New Contributor

Have you checked if the connection is registered on the local server ?

0 Kudos
JoshObrecht
Occasional Contributor

The ArcGIS Server connection?

0 Kudos
BakaryKoné
New Contributor

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 ?

0 Kudos
JoshObrecht
Occasional Contributor

I do not. The only item I have is the ArcGIS Server name in the Upload Service Definition.

0 Kudos
JoshObrecht
Occasional Contributor

Anyone else see this?

0 Kudos
KevinHibma
Esri Regular Contributor

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.

0 Kudos