Automated Publishing of Map Documents

Follow the steps of this chapter to publish Services required for the WebOffice Sample Project easily via python script.

Prerequisites

Check the following requirements before executing the script:

Complete installation of ArcGIS and WebOffice 10.9 R4

Copy all content from WebOffice10.9R4-DVD\SampleProject\WebOffice directories Add-On to your local <ArcGIS Server location>\directories directory

Unpack WebOffice10.9R4-DVD\SampleProject\WebOffice directories Add-On\ServiceDocuments\SampleProject\Data.zip into the same directory

Make sure that the unzipped file geodatabases are now located at <ArcGIS Server location>\directories\ServiceDocuments\SampleProject\Data\

 

Optional requirements

Make sure that a SDE exists in an RDBMS (SQL Server or Oracle). Without an existing SDE the WebOffice Sample Project cannot be published automatically with editing functionality.

 

Adapt the Configuration

Before executing the script adapt the configuration parameters in the file <ArcGIS Server location>\directories\ServiceDocuments\SampleProject\PublishSampleProject.config to your system environment.

 

Mandatory Parameters

Description

Example

ArcGIS Desktop Version

Versions number of the ArcGIS Desktop version in use

10.7, 10.6.1, 10.6, 10.5.1, ...

Hostname

Hostname of the GIS server

gisserver.domain.com

Port

Port of the GIS server

6080 or 6443

Primary Site Administrator

Primry Site Administrator (or another ArcGIS Server account with administrator rights)

siteadmin

Federated Server

Is ArcGIS Server federated to ArcGIS Enterprise?

true or false

arcgisserver Directory

Path to the arcgisserver directory

C:\arcgisserver

Use SDE

Is an SDE in a RDBMS available?

true or false

 

Optional Parameters

Description

Example

Platform

RDBMS platform

SQL_SERVER or ORACLE

Instance

RDBMS instance

SQL-Server: sdeserver\sqlserver

Oracle: TNS

User

SDE account (needs the right to create FeatureClasses)

user

Database

Database name

myDatabase

Execute Script

Now execute the script with a double click. The services will be published automatically.

 

icon_comment

If the script does not execute properly, try to execute as administrator.

 

After starting the script you will find a summary of your input configuration. Check whether all parameters are correct and continue by entering the passwords for the respective accounts:

Primary Site Administrator (or another account with administrator rights)

SDE-User (in case an SDE is avaialable)

 

Confirm (Y) or deny (N) in the next step whether you want to remove existing WebOffice SampleProject files. The following components will be removed by the script:

Delete the SampleProject folder in ArcGIS Server

Delete the SampleProject Caches

Delete the files in the SDE (if available)

Restore the SampleProject MXDs to its original state

Unregister the SampleProject data sources in ArcGIS Server

 

Then the new SampleProject services will be published.

 

Publishing services via script

Publishing services via script

 

icon_cross-reference

See chapter Publish the SynOutputService automatically for more details about the automated publishing of the SynOutputService via script.