markus001

Export Web Map Task: operational layer not printing using proxy url

Discussion created by markus001 on Dec 11, 2017

We are unable to print out ArcGis Map service layers in conjunction with the esri server proxy.

 

We use:

- ArcGIS Server 10.4.1

- DotNet resource-proxy-1.1.2

- dotnet 4.5

- http

- anonimous access to printserver and mapservice

 

 

We use the dotnet proxy from:

https://github.com/Esri/resource-proxy/blob/master/DotNet/README.md

 

The proxy successfully returns the response for

http://[proxyUrl]/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjson

http://[proxyUrl]/proxy.ashx?http://[arcGisServerHost]/arcgis/rest/services/folder1/layer1/MapServer/

 

 

with http://[arcGisServerHost]:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute

 

This minimal ExportWebMap specification returns the expected PDF output:

{

  "operationalLayers": [

{

"currentVersion": 10.41,

  "id": 0,

  "name": "layer1",

  "minScale": 0,

  "maxScale": 0,

"url": "http://[arcGisServerHost]/arcgis/rest/services/folder1/layer1/MapServer/"

  }

],

  "exportOptions": {

    "dpi": 96,

    "outputSize": [

      800,

      600

    ]

  }

}

 

The same ExportWebMap using the proxy returns an empty PDF:

{

  "operationalLayers": [

{

"currentVersion": 10.41,

  "id": 0,

  "name": "layer1",

  "minScale": 0,

  "maxScale": 0,

"url": "http://[proxyUrl]/proxy.ashx?http://[arcGisServerHost]/arcgis/rest/services/folder1/layer1/MapServer/"

  }

],

  "exportOptions": {

    "dpi": 96,

    "outputSize": [

      800,

      600

    ]

  }

}

 

The proxy service is not event hit. If we add "type": "image", -> the proxy is hit.

 

 

According to http://server.arcgis.com/en/server/10.4/create-web-apps/windows/exportwebmap-specification.htm "type" is necessary "If the resource cannot be determined from the URL, the type property defines the type.".

 

Question 1: Why our proxy is not hit without a "type" attribute specified

Question 2: What would be the appropriate value for "type" for a Esri Map Service?

Outcomes