Select to view content in your preferred language

Dynamic Layer do not get displayed through web server

576
2
07-27-2010 08:36 AM
PrakashMukkamala
Emerging Contributor
I am using the Flex Viewer 2 Beta version. I am trying to add a dynamic layer on top of the basemaps.
         <operationallayers>
    <layer
              alpha="1" 
                    label="Resources"
                    type="dynamic"
                    url="http://gisweb2/ArcGIS/rest/services/NationalView/MapServer"
                    visible="true"  
                />            
              <!--  <layer alpha="1"  label="Census" type="dynamic"
                   visible="true" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer" />-->           
        </operationallayers>         
        <basemaps>
            <mapservice label="Streets" type="tiled" visible="false"  alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <mapservice label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <mapservice label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>                  
        </basemaps>      
The dynamic layer shows up fine using a browser using link like this:
file://C:/Users/Prakash.Mukkamala/workspace/mapViewerFlex2/WebContent/index.html
however, when I run the viewer on a web server (JBOSS 4) and try to open the viewer.
The dynamic layer fails to display:
http://localhost:8080/mapViewerFlex2/index.html'>http://localhost:8080/mapViewerFlex2/index.html
I am wondering if any of you have seen this error before.....Thanks for your help in advance.
Tags (2)
0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
Have you put a crossdomain.xml file at http://gisweb2/crossdomain.xml ?
0 Kudos
PrakashMukkamala
Emerging Contributor
Thank you So much Dasa. It worked. When we put the crossdomain.xml file on the gisweb2, the layers started showing up on the map. Thanks again.
0 Kudos