Print Problems using a proxy

1388
1
09-16-2014 02:30 AM
NatashaManzuiga
Occasional Contributor

Hi all, my print widget works fine until I change the full path to relative path in the config.xml.

example:

<layer type="dynamic" label="Test" imageformat="jpg" url="http://localhost:6080/arcgis/rest/services/test_1/Mapserver" visible="true"/>

works fine!

if I use:
<layer type="dynamic" label="Test" imageformat="jpg" url="../arcgis/rest/services/test_1/Mapserver" visible="true"/>

I have a servlet proxy in weblogic that if you ask "../arcgis/rest/services/test_1/Mapserver" response the servlet at the address http://localhost:7001/arcgis/rest/services/test_1/Mapserver and it works...I see the map on flex viewer!!

But it doesnt work on print task!! So I'm trying to change the path using the following line code before subimtJob:

printParameters.map.layers[0].url = "http://localhost:6080/arcgis/rest/services/test_1/Mapserver";

printTask.submitJob(printParameters);

but it still doesnt work...

Someone knows if there is any workaround?

Naty

0 Kudos
1 Reply
NatashaManzuiga
Occasional Contributor

It works if I set

a= new Map();

a= hostBaseWidget.map;

a.layers[0].url="http://localhost:6080/arcgis/rest/services/test_1/MapServer";

My only problem is that I'm still working on hostBaseWidget.map even I created a new Map() object......so...I change the reference with the main map that is in the viewer....

I can't duplicate that object and work on the second one created..

Someone can help me?

Thanks,

Naty

0 Kudos