AnsweredAssumed Answered

Use of exportwebmap from printing toolset

Question asked by amahmoodparachaesrifrance-fr-esridist Employee on Jul 22, 2019
Latest reply on Oct 23, 2019 by amahmoodparachaesrifrance-fr-esridist

Hello everyone,

 

I need one guidance regarding the utilsiation of task arcpy.ExportWebMap_server. 

 

I want to use this task in one of my geo processing synchrone service. During my unit testing, I publish the following geo processing service:

 

import arcpy

arcpy.env.workspace="/app/testprint"

WebMapAsJson = arcpy.GetParameter(0)
FormatPrint = arcpy.GetParameterAsText(1)
LayOutTemplate = arcpy.GetParameterAsText(2)
PrintName = arcpy.GetParameterAsText(3)
testPrintCommand = arcpy.ExportWebMap_server(Web_Map_as_JSON=WebMapAsJson, Output_File=PrintName, Format=FormatPrint, Layout_Templates_Folder="", Layout_Template=LayOutTemplate)

When I execute this code through Python installed on server, the code runs and generates a PNG in the folder /app/testprint without any error. Whereas when I publish the geo-processing service, the code returns me the output filename (\\app\testprint\<filename>.png) but no file is generated.

 

Can anyone please guide me, how can I can make this code works. Any guidance or clue will be useful for me. 

 

Thanks

Outcomes