If you have limited access to the server—for example, in a cloud environment or secure environment—you can create a service definition file that can be shared with a server administrator for publishing at a later time. A service definition file contains information about service properties, capabilities, and the service type, which is encapsulated in one portable file. Optionally, you can configure the service definition file to include the data referenced by your GIS resource.
For example, suppose you're a GIS analyst managing a geodatabase that is constantly being modified by dozens of editors. Every month, this data goes through a quality assurance process to make sure it meets your organization's data integrity standards. After quality checking the data, you can capture the verified geodatabase with a service definition file and transfer it to your server administrator for publishing to an ArcGIS Server site.
To create and save a service definition file that you can publish to your site at a later time, follow these steps.
- Follow the directions in the table below based on what you eventually want to publish to your site:
Option Action Publish a map document
Open the ArcMap document and click File > Share As > Service from the main menu.
Publish a geoprocessing model or tool
Browse to a successful result of the model or tool in the Results window, right-click it, and click Share As > Geoprocessing Service.
Publish another type of item, such as a geodatabase or address locator
Browse to the item in ArcCatalog or the Catalog window, right-click it, and click Share As Service.
- In the Share as Service window, choose Save a service definition file and click Next.
- In the Save a service definition file window, you have two options.
If you want to configure your service definition for a specific ArcGIS Server connection, do the following:
- Select Choose a connection.
- 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 connection to the server by clicking Connect To ArcGIS Server . If you need help with this step, see Connect to ArcGIS Server from ArcGIS Desktop.
- Optionally provide a name for the service. The name cannot be more than 120 characters and may contain only alphanumeric characters and underscores.
- Click Next.
- 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 folder to contain the service, and click Next.
If you are currently disconnected or have limited access to the server, do the following:
- Select No available connection.
- 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.
- In the Server Type drop-down list, choose ArcGIS Server.
- Optionally provide a new name for the service. The name cannot be more than 120 characters and may contain only alphanumeric characters and underscores.
- Click Next.
- Choose the location to save the service definition file. You can accept the default or specify a location of your own.
- Click Continue.
The Service Editor appears.
- 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.
- Click Analyze . This examines your GIS resource to see if it can be saved as a service definition.
- Fix any errors 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 Analyze your GIS resource.
- Once you've fixed the errors and, optionally, any warnings and messages, click Stage .
Your service definition is saved to the location you specified and can be published to the ArcGIS Server site at any time.