Please see this help page:
http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...
Please see this help page:
http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/01540000...
<map esrilogovisible="true" openhandcursorvisible="true" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="-13458291.5379666 4173046.713184668 -13425614.70837473 4191582.6925437986" wkid="102100" top="40"> <operationallayers> <layer type="dynamic" label="SaveTheBay" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SaveTheBay/MapServer" visible="true"/> </operationallayers> </map>
<?xml version="1.0" ?> <configuration> <taskurl>http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task</taskurl> <title visible="false"/> <copyright visible="false"/> <author visible="false"/> <usescale visible="true"/> </configuration>
Here's a working example. The login is: user1/user1
map config:<map esrilogovisible="true" openhandcursorvisible="true" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="-13458291.5379666 4173046.713184668 -13425614.70837473 4191582.6925437986" wkid="102100" top="40"> <operationallayers> <layer type="dynamic" label="SaveTheBay" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SaveTheBay/MapServer" visible="true"/> </operationallayers> </map>
print widget config:<?xml version="1.0" ?> <configuration> <taskurl>http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task</taskurl> <title visible="false"/> <copyright visible="false"/> <author visible="false"/> <usescale visible="true"/> </configuration>
Does it print fine if you turn off security on your service? If not, then it's probably a different problem.
What is the URL to your print service? That server needs to be able to connect to your service.
Can you use a tool like HttpFox to see the print request and response?
The client should be sending the short term token as part to the url in the Web_Map_as_JSON parameter.