laptop and a wrench

Bug

The ConvertWebMapToMapDocument function fails to authenticate via a server connection file for certain service types.

Zuletzt veröffentlicht: November 13, 2019 ArcGIS GIS Server
Bug-ID-Nummer BUG-000126389
EingereichtOctober 29, 2019
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS GIS Server
Gefunden in Version10.6.1
StatusWill Not Be Addressed

Zusätzliche Informationen

It is strongly recommended to move to a ArcGIS Pro based print service.

Workaround

For secured services, generate a token to supply within the Web Map json. For example:

def get_token(portal, username, password):

  token_url = '%s/sharing/rest/generateToken/' % portal

  params = {'f': 'json', 'username': username, 'password': password, 'client' : 'referer','referer': portal}

  req = urllib2.Request(token_url, urllib.urlencode(params))

  try:

    response = urllib2.urlopen(req)

  except:

    context = ssl._create_unverified_context()

    response = urllib2.urlopen(req, context=context)

  token = str(json.load(response)['token'])

  return token

username = "siteadmin"

password = "siteadmin"

portal = "https://earl.esri.com/portal"

token = get_token(portal, username, password)

webmap_json = str({"mapOptions":{"showAttribution":False,"extent":{"xmin":-13528474.13135027,"ymin":4075245.077838606,"xmax":-13076884.168241667,"ymax":4219558.18724095,"spatialReference":{"wkid":102100,"latestWkid":3857}},"spatialReference":{"wkid":102100,"latestWkid":3857},"scale":1155581.108577},"operationalLayers":[{"id":"asterPrint_9733","title":"asterPrint_9733","opacity":1,"minScale":0,"maxScale":0,"url":"https://emedina1.esri.com/image/rest/services/asterPrint/ImageServer", "token":token}],"exportOptions":{"outputSize":[746,575],"dpi":96}})

Schritte zur Reproduzierung

Bug-ID: BUG-000126389

Software:

  • ArcGIS GIS Server

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln