 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.http.HTTPService;
+import mx.utils.URLUtil;
 
 [Event(name="configLoaded", type="com.esri.viewer.AppEvent")]
 


            var portalURL:String = configXML.map.@portalurl[0] || configXML.map.@arcgissharingurl[0];
            var addArcGISBasemaps:Boolean = configXML.map.@addarcgisbasemaps[0] == "true";

            if (webMapItemID)
            {

package com.esri.viewer.managers
{

import com.esri.ags.components.IdentityManager;
import com.esri.ags.components.supportClasses.ServerInfo;
import com.esri.ags.events.WebMapEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.layers.ArcGISDynamicMapServiceLayer;
