operational layers causing Application Error...Not adding

287
3
06-15-2011 08:49 AM
JohnCodd
New Contributor III
Hello, Please help with getting at least one operational layer added so I can then add more once successful.
error when opening the flexviewer with my operational layer added:
  http response status: 200
  Fault code: Client CouldNotDecode
  Fault info: Error #1090
  Fault details: null
I don't get this error when the operational layer is commented out.

My setup: ArcGIS Server 9.3.1 sp2 sp2QUI
Using ArcGIS Sample Flexviewer231 config.xml which works fine until I add my operational layer that is a rest service on the same server (no crossdomain issue).  My layer is DC Boundary, the last one in the <operationallayers> container.  The dataframe and the file geodatabase feature class have the same coordinate and projections as the default basemaps that come with the viewer.  The one layer service was created in AGS Manager from a .MSD that I created from the .MXD with only one layer in it.  I tried  type="feature" and "dynamic", visible = "true" and "false".
http://rptgistapp1/ArcGIS/rest/services/MapServices/Flex231dcbndgen/MapServer/0

<operationallayers>
            <!--layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/..."/> -->
            <!--layer label="Fires" type="feature" visible="false" alpha="1.0"
                   popupconfig="popups/PopUp_Fires.xml"
url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> --> 
           
            <layer label="DC Boundary" type="feature" visible="True" alpha="1.0      
             url="http://rptgistapp1/ArcGIS/rest/services/MapServices/Flex231dcbndgen/MapServer/0"/>
                        
        </operationallayers>

If you have anything I should try to add this as an operational layer or if I need to create the service in a different way, or if you see an access problem I would really appreciate your guidance.
Thank you all very much!
John
John Codd
Tags (2)
0 Kudos
3 Replies
LarryJahn
Occasional Contributor
<operationallayers> 
<!--layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/> --> 
<!--layer label="Fires" type="feature" visible="false" alpha="1.0" 
popupconfig="popups/PopUp_Fires.xml" 
url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> -->  
  
<layer label="DC Boundary" type="feature" visible="True" alpha="1.0  
url="http://rptgistapp1/ArcGIS/rest/services/MapServices/Flex231dcbndgen/MapServer/0"/> 
  
</operationallayers>


It appears you are missing a </layer> tag right above the </operationallayers> tag.
0 Kudos
JustinConner
Occasional Contributor II
You shouldn't need the  </layer> tag there although I don't think it would hurt anything. I think you need to remove the /0 after MapServer.

<operationallayers>
        <layer label="DC Boundary" type="feature" visible="True" alpha="1.0
        url="http://rptgistapp1/ArcGIS/rest/services/MapServices/Flex231dcbndgen/MapServer"/>
</operationallayers>
0 Kudos
JohnCodd
New Contributor III
Thanks for the guidance from fellow active Forum participants and the ESRI technical staff.  I am now able to consume my services as type = "dynamic" operational layers in my ArcGIS Viewer for Flex.  I am using the compiled sample Flex Viewer and compiled sample widgets.  All work is on the AGS 9.3.1 sp2 sp2 QUI server box; SDE not installed on here so I am using file geodatabases.
Here is what I am doing now:
o Created Project Specific File Geodatabase
o Created thematic Featuredatasets.
�?� Selected predefined coordinate system: WGS-1984_Web_Mercator for each  Featuredataset
�?� Exported Featureclasses from central SDE into my new coordinate-defined Featuredatasets
�?� During export choose the WGS-1984_Web_Mercator for each Featureclass
�?� In ArcMap 9.3.1
�?� Create .MXD�??s for each operational layer or layers appropriate for the final application
o layer symbols
o scale specified settings
o labeling
�?� Preview Map with �??Map Service Publishing�?� toolbar
�?� Create Map Services in the AGS server root with  �??Map Service Publishing�?� toolbar
o In Sample Flex Viewer config.xml:
o Add my map services as operational layers type=�?�dynamic�?��?�

<operationallayers>

<layer label="DC Bldgs General" type="dynamic" visible="false" alpha="1.0" url="http://rptgistapp1/ArcGIS/rest/services/DCLbldgGen/MapServer"/>

<layer label="DC Wards 2002 Boundary" type="dynamic" visible="false" alpha="1.0"       
url="http://rptgistapp1/ArcGIS/rest/services/DCWards2002/MapServer"/>

<layer label="DC Owner Polygons" type="dynamic" visible="true" alpha="1.0"  url="http://rptgistapp1/ArcGIS/rest/services/DCOwnPly/MapServer"/>

</operationallayers>
John Codd
0 Kudos