loadCCAPIConfig(arguments.siteType); // load the elements and templates loadElements(); loadWSVars(); buildWS(); var siteID = 0; var CCAPIConfig = StructNew(); var configAppXMLPath = ""; if ( arguments.siteType EQ "destination" ){ siteID = application.ptSync.cache.siteData.dest.siteid; configAppXMLPath = Replace(application.ptSync.cache.siteData.dest.rootpath,"/","\","all") &"_cs_apps\config\ccapi.cfm"; } // Strip out the code to get only the XML data startLineText = ''; endLineText = ''; startPoint = FindNoCase(startLineText, configXML) + LEN(startLineText); endPoint = FindNoCase(endLineText, configXML) - startPoint; configXML = MID(configXML, startPoint, endPoint); configXML = TRIM(configXML); if ( isXML(configXML) ){ CCAPIConfig = Server.CommonSpot.MapFactory.deserialize(configXML); setCCAPIConfig(CCAPIConfig); } variables.utils.logAppend("Config XML file is not setup for this site [#siteID#].", "CCAPI_Errors.log");