This appears to be a CommonSpot Cloud server, but the line in the servervars.cfm for enabling the CCAPI is currently commented out. Edit the servervars.cfm file in /cust/keys/cs/ and uncomment "ServerInfo.ccapiAccessDir", it should be the last line in the file. Restart #server.coldfusion.productname# once you are finished. // !!! START- UPDATE THESE VALUES FOR THE SPECIFIC CCAPI TEST TO RUN !!! verboseOutput = false; remoteRequests = false; serviceLegacyMode = true; // true - will use cs_service instead of cs_remote enableADFCCAPIv1 = true; enableADFCCAPIv2 = true; enableADFAPIv1 = true; // !!! END- UPDATE THESE VALUES FOR THE SPECIFIC CCAPI TEST TO RUN !!! ccapiConfig = StructNew(); // !!! START- UPDATE THESE VALUES FOR YOUR SERVER !!! ccapiConfig.userid = "webmaster"; ccapiConfig.password = "password"; // !!! END - UPDATE THESE VALUES FOR YOUR SERVER !!! ccapiConfig.site = "#request.site.url#"; ccapiConfig.subsiteID = 1; // FORCE LEGACY SERVICE MODE FOR SITE LESS THAN OR EQUAL TO VERSION 6.x if ( ListFirst(ListLast(request.cp.productversion," "),".") LTE 6 ) serviceLegacyMode = true; if ( serviceLegacyMode ) { // FOR CS 7.0 and 8.0 use cs_service.cfc ccapiConfig.webserviceURL = "http://#Request.CGIVars.SERVER_NAME#:#Request.CGIVars.SERVER_PORT#/commonspot/webservice/cs_service.cfc?wsdl"; ccapiConfig.localServicePath = "commonspot.webservice.cs_service"; } else { // FOR CS 7.0.1, 8.0.1 and 9+ use cs_remote.cfc ccapiConfig.webserviceURL = "http://#Request.CGIVars.SERVER_NAME#:#Request.CGIVars.SERVER_PORT#/commonspot/webservice/cs_remote.cfc?wsdl"; ccapiConfig.localServicePath = "commonspot.webservice.cs_remote"; } // Check for URL variables doCCAPIdump = false; if ( StructKeyExists(request.params,"ccapiDump") AND IsBoolean(request.params.ccapiDump) ) doCCAPIdump = request.params.ccapiDump;

Site: #ccapiConfig.site#

Service Component: cs_service (legacy ccapi) cs_remote
Service Requests: Remote Local
Verbose Output: #UCASE(verboseOutput)#

Click to RUN the CCAPI Dump

== STANDARD CS CCAPI ==

Standard CCAPI config settings
if ( remoteRequests ) { // create object for the remote webService call ccapiObj = createObject("webservice", ccapiConfig.webserviceURL); } else { // create object for the LOCAL webservice call ccapiObj = createObject("component", ccapiConfig.localServicePath); } // call the login API foo = ccapiObj.csLogin( site = ccapiConfig.site, csUserID = ccapiConfig.userID, csPassword = ccapiConfig.password, subSiteID = ccapiConfig.subsiteID, subSiteURL = '' );
CCAPI Object

Login Failed

Login -- #ssid# (#foo#)

// call the login API foo = ccapiObj.cslogout(ssid);

Logout -- #foo#

STANDARD CS CCAPI ERROR

Click the link above to run.


== ADF CCAPI 1.0 ==

ccapiObj1 = server.ADF.objectFactory.getBean("ccapi_1_0"); ccapiObj1.initCCAPI(); ccapiLoginRet1 = ccapiObj1.login(1); ccapiSSID1 = ccapiObj1.getSSID();

Login -- #ccapiSSID1#

Logout -- #ccapiLogoutRet1#

ADF CCAPI 1.0 ERROR

Click the link above to run.


== ADF CCAPI 2.0 ==
(If you are logged in to CommonSpot this test will log you out.)

ccapiObj2 = server.ADF.objectFactory.getBean("ccapi_2_0"); ccapiObj2.initCCAPI(); ccapiLoginRet2 = ccapiObj2.login(subsiteID=1,remote=remoteRequests); ccapiSSID2 = ccapiObj2.getSSID();

Login -- #ccapiSSID2#

Logout -- #ccapiLogoutRet2#

ADF CCAPI 2.0 ERROR

Click the link above to run.


== ADF COMMAND API 1.0 ==
(If you are logged in to CommonSpot this test will log you out.)

apiObj = server.ADF.objectFactory.getBean("api_1_0"); apiObj.init(); apiLoginRet = apiObj.login(remote=remoteRequests,forceSubsiteID=0); apiToken = apiObj.getAPIToken();

Login -- #apiToken#

Logout -- #apiLogoutRet#

ADF API 1.0 ERROR

Click the link above to run.