PublishMSDToServer (arcpy.mapping)

サマリ

レガシーレガシー:

Starting at ArcGIS 10.1, Map Server Definition (.msd) files have been replaced with Service Definition Draft (.sddraft) and Service Definition (.sd) files. Please use the Upload Service Definition Geoprocessing tool instead.

Publishes an existing map service definition (MSD) file to a designated ArcGIS for Server.

説明

Starting at ArcGIS 10.1, Map Server Definition (.msd) files have been replaced with Service Definition Draft (.sddraft) and Service Definition (.sd) files. See the following help topics for more information: What's new in ArcGIS 10.1 for Server, What to expect when migrating to ArcGIS 10.1 for Server and Migration to ArcGIS 10.1 for Server.

Automating the publishing of a Map Document to a GIS Server using ArcPy is a four-part process. The first step is to run the CreateMapSDDraft function. The output created from CreateMapSDDraft is a Service Definition Draft (.sddraft) file. A Service Definition Draft is the combination of a Map Document, information about the server, and a set of service properties. The output Service Definition Draft file can then be analysed for suitability and potential performance issues using the AnalyzeForSD function. The Service Definition Draft can then be converted to a fully consolidated Service Definition (.sd) file using the Stage Service Geoprocessing tool. Staging compiles all the necessary information needed to successfully publish the GIS resource. If you have chosen to copy data to the server, the data will be added when the Service Definition Draft is staged. Finally, the Service Definition file can be uploaded and published as a GIS service to a specified GIS server using the Upload Service Definition Geoprocessing tool. This step takes the Service Definition file, copies it onto the server, extracts required information, and publishes the GIS resource. For more information, see overview of the Publishing toolset.

構文

PublishMSDToServer (msd_path, connection_url_or_name, server, service_name, {folder_name}, {service_capabilities}, {connection_username}, {connection_password}, {connection_domain})
パラメータ説明データ タイプ
msd_path

A string that represents the path and name of an existing MXD document you want to serve.

String
connection_url_or_name

A string that represents the URL of the ArcGIS for Server to which you want to publish the MSD.

String
server

A string that represents the ArcGIS for Server host name to which you want to publish the MSD.

String
service_name

A string that represents the name of the service. This is the name people will see and use to identify the service. The name can only contain alphanumeric characters and underscores. No spaces or special characters are allowed. The name cannot be more than 120 characters in length.

String
folder_name

A string that represents a folder name to which you want to publish the MSD. If the folder does not currently exist, it will be created. The default folder is the server root level.

String
service_capabilities
[service_capabilities,...]

A list of strings that represents additional capabilities in addition to the map service capability.

  • MAPPINGThe default ArcGIS for Server capability
  • KMLKeyhole Markup Language
  • WCSWeb Coverage Service
  • WFSWeb Feature Service
  • WMSWeb Map Service

(デフォルト値は次のとおりです MAPPING)

String
connection_username

A string that represents a user name used to connect to the ArcGIS for Server. To publish a map service, this user name should be a member of the ArcGIS for Server admin group. This variable is only necessary when connecting to a UNIX/Linux ArcGIS for Server.

(デフォルト値は次のとおりです None)

String
connection_password

A string that represents a password used to connect to the ArcGIS for Server. This variable is only necessary when connecting to a UNIX/Linux ArcGIS for Server.

(デフォルト値は次のとおりです None)

String
connection_domain

A string that represents a domain name used to connect to the ArcGIS for Server. This variable is only necessary when connecting to a UNIX/Linux ArcGIS for Server.

(デフォルト値は次のとおりです None)

String
9/14/2013