Please see this help page:http://resources.arcgis.com/en/help/main/10.1/#/Printing_maps_that_contain_secured_services/0154000005q3000000/
<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 Web Map Task</taskurl> <title visible="false"/> <copyright visible="false"/> <author visible="false"/> <usescale visible="true"/> </configuration>
Here's a working example. The login is: user1/user1map 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 Web Map Task</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.
This is the kind of problem I'm referring to:http://forums.arcgis.com/threads/62538-Error-when-using-print-service-on-dynamic-layer?p=221720&viewfull=1#post221720If the print task and map services are on the same GIS server, the server is still making a HTTP request to the url in the web map json, so it's acting as a client to itself.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.