             var dsUris:Array = [];
             var dsChannels:XMLList;
             var channelConfig:XML;
+            var endpoint:XML;
+            var dsUri:String;
             for (var j:uint = 0; j<ids.length; j++)
             {
                 dsChannels = xml.channels.channel.(@id == ids[j]);
                 channelConfig = dsChannels[0];
-                dsUris.push(channelConfig.endpoint[0].attribute(URI_ATTR).toString());
+                endpoint = channelConfig.endpoint;
+                // uri might be undefined when client-load-balancing urls are specified.
+                dsUri = endpoint.length() > 0? endpoint[0].attribute(URI_ATTR).toString() : null;
+                if (dsUri != null)
+                    dsUris.push(dsUri);
             }
 
             return ObjectUtil.compare(csUris, dsUris) == 0;

                if (propertyKey == "")
                {
                    // Add as a value
                    var name:Object = configXML.localName();
                    var parent:XML = configXML.parent();
                    parent[name] = propertyValue;
                }
                else
                {


                for (var i:int = 0; i < propertyValueList.length; i++)
                {
                    var propertyXML1:XML = <{propertyKey}></{propertyKey}>
                    configXML.appendChild(propertyXML1);
                    convertToXML(propertyValueList[i] as ConfigMap, propertyXML1);
                }
            }
            else // assuming that it is ConfigMap
            {
                var propertyXML2:XML = <{propertyKey}></{propertyKey}>
                configXML.appendChild(propertyXML2);
                convertToXML(propertyValue as ConfigMap, propertyXML2);
            }
