Using ArcMap, 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:
- Follow the directions in the table below based on what you eventually want to publish to your site:
If you want to publish a map document…
…open the ArcMap 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, and 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, and choose 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.
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 . For information on how to best configure your service definition for deployment, see Tune and configure services.
- 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.
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 ArcGIS Server site are saved in the staging folder on disk. For more information, see About draft services.
- 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.