Print Widget not working for layers that require a proxy url

6750
6
01-15-2013 10:18 AM
SebastianRoberts
Occasional Contributor III
Using the Viewer for Flex Application builder 3.1, I've added a couple of operational layers that require a proxy.  These display fine, but the print widget generates an error.  When using the print widget, the "Web Map as JSON" that is generated does not include the proxy url before these operational layers. The Viewer reports:  "RPC fault, failed to create layer from service at....".  When I test at the REST endpoint, I can take the JSON generated by the print widget and just add the proxy url before service url and everything works splendidly.
 
Is this a bug with the Application builder, or am I missing some configuration option for the print widget to tell it to use the proxy?  I see some other widgets that have a proxy checkbox, but don't see that with the print widget.

Thanks in advance,
Sebastian Roberts
Tags (2)
0 Kudos
6 Replies
SaurabhGupta5
Occasional Contributor

Hi Sebastian,

Facing same issue, did you find the resolution of same prepending the proxy url. I am using ESRI Flex 3.6

Thanks

Saurabh

0 Kudos
SebastianRoberts
Occasional Contributor III


Hello Saurabh,

  My appologies, it's been too long, and I don't rememer the solution.  We aren't using the Flex application builder to build new applications (using javascript api and now the web app builder).

  I did take a look at the JSON for the now working print tool, and I see that it still doesn't prepend the proxy url even though it is refereencing a protected layer in the map output, so the solution didn't involve cajoling the print widget into using the proxy.  I'm sorry I'm not more help!  I usually try to post answers to my own questions if I resolve them myself, but I overlooked this one.

Regards,

Sebastian

0 Kudos
SaurabhGupta5
Occasional Contributor

Hi Sebastian,

Thanks for your quick response!!

I am totally stucked with this issue

service.

As per the ESRI notes i did created new printing gp service based on the user created connection but no success

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

If possible can you cross check for your proxy and export web map toolbox in arccatalog? are you utilizing the inbuilt printing service or created your own toolbox and publishing from there?

Anyhelp would be appreciated.

Regards

Saurabh

0 Kudos
SebastianRoberts
Occasional Contributor III

Hello Saurabh,

  We are using our own public print service (our own toolbox if you will), and calling it using https.

https: //countyserver/arcgis/rest/services/public/CountyPrintService/GPServer/Export%20Web%20Map/submitJob

The webmap as json in the print request is pasted below.  You can see we are using some internal services which are protected and require a proxy.  I don't see any significant configuration in the print service


Regards,

Sebastian

Web_Map_as_JSON:{"exportOptions":null,"operationalLayers":[{"title":"web cache base","id":"web cache base","url":"https: //countyserver/arcgis/rest/services/public/web_cache_base/MapServer"},{"title":"Election Landbase","id":"Election Landbase","visibleLayers":[],"url":"https: //countyserver/arcgis/rest/services/internal/Election_Land/MapServer"},{"title":"Election Supervisor","id":"Election Supervisor","visibleLayers":[],"url":"https: //countyserver/arcgis/rest/services/internal/Election/MapServer"},{"title":"Election Districts","id":"Election Districts","visibleLayers":[0],"url":"https: //countyserver/arcgis/rest/services/internal/Election_District/MapServer","opacity":0.6484375},{"title":"Election Precincts","id":"Election Precincts","visibleLayers":[],"url":"https: //countyserver/arcgis/rest/services/internal/Election_/MapServer"}],"layoutOptions":{"legendOptions":{"operationalLayers":[{"id":"Election Landbase"},{"id":"Election Supervisor"},{"id":"Election Districts"},{"id":"Election Precincts"}]}},"mapOptions":{"extent":{"xmax":-13461169.035743073,"ymax":4763240.1379219275,"xmin":-13492278.906255096,"spatialReference":{"wkid":102100},"ymin":4746538.647241639}}}

0 Kudos
SaurabhGupta5
Occasional Contributor

Hello Sebastian,

Thanks again for your response!!

Just a last query on this one , i cannot see the complete Web_Map_as_JSON string in your reply. Can you please check for me whether in your case string contains token or not. Jim from this post is suggesting this so just wanna crosscheck.Secured Printing Service  Thanks Again

0 Kudos
SebastianRoberts
Occasional Contributor III

Saurabh,

  I just had a similar issue with the same print service when using it in the Web AppBuilder print widget. In resolving that issue, it reminded me how I resolved it with the Flex Print widget.  Using https in the url for the print service resolves the issue for my services.  Also be sure to include an https path in the config file of your dynamic proxy page if you are using one.

0 Kudos