jestanford

Printing Secured Service

Discussion created by jestanford on Feb 12, 2013
Latest reply on Jul 5, 2013 by mattlane86
Hi,
I haven't seen a satisfactory answer to this issue but maybe somebody has some fresh ideas.

I have some secured services hosted in Server 10.1 that use long term tokens. In order to facilitate printing I published a custom Export Web Map tool according to these instructions - Printing maps that contain secured services .

I can successfully use this custom service to print map containing all unsecured layers but as soon as I add a layer from the secured service I get: {"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool."]}}.

If I paste all of the same parameters into the REST Service Directory interface I receive the same error, so I don't think it's a problem with the proxy page.

Here is the content of the Web_Map_as_JSON parameter:
{"mapOptions":{"showAttribution":true,"extent":{"xmin":-13074789.94993775,"ymin":4015647.8563408996,"xmax":-13073490.52045701,"ymax":4016726.33503677,"spatialReference":{"wkid":102100}},"spatialReference":{"wkid":102100}},"operationalLayers":[{"id":"layer0","title":"layer0","opacity":1,"minScale":591657527.591555,"maxScale":1128.497176,"url":"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},{"id":"layer2","title":"layer2","opacity":1,"minScale":0,"maxScale":0,"url":"http://ec2-54-243-148-157.compute-1.amazonaws.com/be/rest/services/v2/BERides/MapServer?token=MY_TOKEN_GOES_HERE","visibleLayers":null,"layers":[]},{"id":"layer1","title":"layer1","opacity":1,"minScale":591657527.591555,"maxScale":1128.497176,"url":"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"}],"exportOptions":{"outputSize":[800,1100],"dpi":96}}

I'm using the same token to add the layers to the map and am having no display problems.

Not sure what to troubleshoot next. Any ideas?

Thanks!

Outcomes