Creating a service definition in ArcGIS for Desktop

Using ArcGIS for Desktop, you can quickly create a service definition that can be uploaded and published to your ArcGIS Server site at a later time. This is occasionally necessary in cloud environments, in secure environments, or when the server is not immediately available.

To create and save a service definition file that you can publish to your site at a later time, follow these steps:

Steps:
  1. Follow the directions in the table below based on what you eventually want to publish to your site:

    Option

    Action

    If you want to publish a map or globe document…

    …open the ArcMap or ArcGlobe document and choose File > Share As > Service from the main menu.

    If you want to publish a geoprocessing model or tool…

    …browse to a successful result of the model or tool in the Results window, right-click it, then choose Share As > Geoprocessing Service.

    If you want to publish something else, such as a geodatabase or address locator…

    …browse to the item in ArcCatalog or the Catalog window, right-click it, then choose Share As Service.

  2. In the Share as Service window, choose Save a service definition file.

    Click Next.

  3. In the Save a Service Definition window, you have two options:
    • If you want to configure your service definition for a specific ArcGIS Server connection, do the following:

    1. Select Choose a connection.
    2. Click the connection you want to use from the Choose a connection drop-down list. If the server connection you want to use is not listed, you can create a new connection to the server by clicking Connect To ArcGIS Server Add ArcGIS Server. If you need help with this step, see About connecting to ArcGIS Server in ArcGIS for Desktop.
    3. Optionally, enter a name for the service. The name cannot be more than 120 characters long and may contain only alphanumeric characters and underscores.
    4. Click Next.
    5. By default, services are published to the root folder (root) of ArcGIS Server. Services can be organized into subfolders under the root folder. Choose the folder where you want to publish the service, or create a new folder to contain the service, and click Next.
    • If you are currently disconnected or have limited access to the server, do the following:

    1. Select No available connection.
    2. If you want to upload the data your service definition references to the server at the time of publishing, choose Include data in service definition when publishing.
    3. In the Server Type drop-down list, choose ArcGIS Server.
    4. Optionally, enter a new name for the service. The name cannot be more than 120 characters long and may contain only alphanumeric characters and underscores.
    5. Click Next.
  4. Choose the location to save the service definition file. You can accept the default or specify a location of your own.
  5. Click Continue. The Service Editor appears.
  6. Set the properties you want for your service definition. Here you can choose what users can do with your service definition and take fine-grained control of how the server will expose your service definition.
    NoteNote:

    For details on how to manually set the properties of your service definition, locate the type of service you want to publish in the Types of services section of the help. You can also automatically import properties from an existing service definition or a published service by clicking Import Import. For information on how to best configure your service definition for deployment, see Tuning and configuring services.

  7. Click Analyze Analyze. This examines your GIS resource to see if it can be saved as a service definition.
  8. Fix any errors (Error) in the Prepare window; this must be done before you can stage your service definition locally on disk. Optionally, you can fix the warnings and informational messages to further improve the performance and appearance of the service derived from your service definition file. For more information about resolving these issues, see Analyzing your GIS resource.
    TipTip:

    If you close the Service Editor during this session, you'll be prompted to save your work as a draft service. Draft services allow you to come back to your service definition configuration work at a later time. By default, service definition files being configured for a specific ArcGIS Server connection are saved in the Drafts folder of the connection. Conversely, service definitions being configured with no available connection to the server are saved in the staging folder on disk. For more information, see About draft services.

  9. Once you've fixed the errors and, optionally, any warnings and messages, click Stage Stage.

Your service definition is saved to the location you specified and can be published to the server at any time.

Related Topics

9/1/2015