00001 #include "otsdaq-core/WebUsersUtilities/RemoteWebUsers.h" 00002 00003 #include "otsdaq-core/SOAPUtilities/SOAPParameters.h" //must include in .h for static function 00004 #include "otsdaq-core/SOAPUtilities/SOAPUtilities.h" 00005 #include "otsdaq-core/SOAPUtilities/SOAPCommand.h" 00006 #include "otsdaq-core/XmlUtilities/HttpXmlDocument.h" 00007 #include "otsdaq-core/CgiDataUtilities/CgiDataUtilities.h" 00008 00009 #include <cstdlib> 00010 #include <cstdio> 00011 #include <vector> 00012 00013 #include "otsdaq-core/SupervisorInfo/AllSupervisorInfo.h" 00014 00015 00016 using namespace ots; 00017 00018 #undef __MF_SUBJECT__ 00019 #define __MF_SUBJECT__ "RemoteWebUsers" 00020 00021 //======================================================================================================================== 00022 //User Notes: 00023 // - use xmlRequestGateway to check security from outside the Supervisor and Wizard 00024 // 00025 // Example usage: 00026 // 00027 // 00028 // 00029 // void exampleClass::exampleRequestHandler(xgi::Input * in, xgi::Output * out) 00030 // 00031 // { 00032 // cgicc::Cgicc cgi(in); 00033 // 00034 // //... 00035 // 00036 // HttpXmlDocument xmldoc; 00037 // std::string userWithLock, userName, displayName; 00038 // uint64_t activeSessionIndex; 00039 // uint8_t userPermissions; 00040 // 00041 // //**** start LOGIN GATEWAY CODE ***// 00042 // //check cookieCode, sequence, userWithLock, and permissions access all in one shot! 00043 // { 00044 // bool automaticCommand = 0; //automatic commands should not refresh cookie code.. only user initiated commands should! 00045 // bool checkLock = true; 00046 // bool lockRequired = true; 00047 // 00048 // if(!theRemoteWebUsers_.xmlRequestToGateway( 00049 // cgi,out,&xmldoc,theSupervisorsConfiguration_ 00050 // ,&userPermissions //acquire user's access level (optionally null pointer)// 00051 // ,!automaticCommand //true/false refresh cookie code 00052 // ,USER_PERMISSIONS_THRESHOLD //set access level requirement to pass gateway 00053 // ,checkLock //true/false enable check that system is unlocked or this user has the lock 00054 // ,lockRequired //true/false requires this user has the lock to proceed 00055 // ,&userWithLock //acquire username with lock (optionally null pointer) 00056 // ,&userName //acquire username of this user (optionally null pointer) 00057 // ,0//,&displayName //acquire user's Display Name 00058 // ,0//,&activeSessionIndex //acquire user's session index associated with the cookieCode 00059 // )) 00060 // { //failure 00061 // //std::cout << out->str() << std::endl; //could print out return string on failure 00062 // return; 00063 // } 00064 // } 00065 // //done checking cookieCode, sequence, userWithLock, and permissions access all in one shot! 00066 // //**** end LOGIN GATEWAY CODE ***// 00067 // 00068 // //Success! if here. 00069 // // 00070 // //... use acquired values below 00071 // //... 00072 // 00073 // //add to xml document, for example: 00074 // //DOMElement* parentEl; 00075 // //parentEl = xmldoc.addTextElementToData("ExampleTag", "parent-data"); 00076 // //xmldoc.addTextElementToParent("ExampleChild", "child-data", parentEl); 00077 // 00078 // //return xml doc holding server response 00079 // //xmldoc.outputXmlDocument((std::ostringstream*) out, true); //true to also print to std::cout 00080 // } 00081 // 00082 // 00083 //======================================================================================================================== 00084 00085 00086 00087 00088 RemoteWebUsers::RemoteWebUsers(xdaq::Application* application) 00089 : SOAPMessenger (application) 00090 { 00091 ActiveUserLastUpdateTime_ = 0; //init to never 00092 ActiveUserList_ = ""; //init to empty 00093 } 00094 00095 //======================================================================================================================== 00096 //xmlRequestGateway 00097 // if false, user code should just return.. out is handled on false; on true, out is untouched 00098 bool RemoteWebUsers::xmlRequestToGateway( 00099 cgicc::Cgicc& cgi, 00100 std::ostringstream* out, 00101 HttpXmlDocument* xmldoc, 00102 const AllSupervisorInfo& allSupervisorInfo, 00103 WebUsers::RequestUserInfo& userInfo ) 00104 { 00105 00106 //initialize user info parameters to failed results 00107 WebUsers::initializeRequestUserInfo(cgi,userInfo); 00108 00109 //const_cast away the const 00110 // so that this line is compatible with slf6 and slf7 versions of xdaq 00111 // where they changed to XDAQ_CONST_CALL xdaq::ApplicationDescriptor* in slf7 00112 // 00113 // XDAQ_CONST_CALL is defined in "otsdaq-core/Macros/CoutMacros.h" 00114 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* gatewaySupervisor; 00115 00116 SOAPParameters parameters; 00117 xoap::MessageReference retMsg; 00118 00119 //**** start LOGIN GATEWAY CODE ***// 00120 //If TRUE, cookie code is good, and refreshed code is in cookieCode 00121 //Else, error message is returned in cookieCode 00122 //tmpCookieCode_ = CgiDataUtilities::getOrPostData(cgi,"CookieCode"); //from GET or POST 00123 00124 // __COUT__ << cookieCode.length() << std::endl; 00125 // __COUT__ << "cookieCode=" << cookieCode << std::endl; 00126 // __COUT__ << std::endl; 00127 00129 //have CookieCode, try it out 00130 if(allSupervisorInfo.isWizardMode()) 00131 { 00132 //if missing CookieCode... check if in Wizard mode and using sequence 00133 std::string sequence = CgiDataUtilities::getOrPostData(cgi,"sequence"); //from GET or POST 00134 //__COUT__ << "sequence=" << sequence << std::endl; 00135 if(!sequence.length()) 00136 { 00137 __COUT__ << "Invalid attempt (@" << userInfo.ip_ << ")." << std::endl; 00138 *out << WebUsers::REQ_NO_LOGIN_RESPONSE; 00139 //invalid cookie and also invalid sequence 00140 goto HANDLE_ACCESS_FAILURE; //return false, access failed 00141 } 00142 00143 //have sequence, try it out 00144 00145 gatewaySupervisor = allSupervisorInfo.getWizardInfo().getDescriptor(); 00146 if(!gatewaySupervisor) 00147 { 00148 __COUT_ERR__ << "Missing wizard supervisor." << std::endl; 00149 *out << WebUsers::REQ_NO_LOGIN_RESPONSE; 00150 //sequence code present, but no wizard supervisor 00151 goto HANDLE_ACCESS_FAILURE; //return false, access failed 00152 } 00153 00154 parameters.addParameter("sequence",sequence); 00155 parameters.addParameter("IPAddress",userInfo.ip_); 00156 retMsg = SOAPMessenger::sendWithSOAPReply(gatewaySupervisor, 00157 "SupervisorSequenceCheck", parameters); 00158 parameters.clear(); 00159 parameters.addParameter("Permissions"); 00160 receive(retMsg, parameters); 00161 00162 userInfo.setGroupPermissionLevels(parameters.getValue("Permissions")); 00163 00164 if(WebUsers::checkRequestAccess(cgi,out,xmldoc,userInfo,true /*isWizardMode*/)) 00165 return true; 00166 else 00167 goto HANDLE_ACCESS_FAILURE; //return false, access failed 00168 00169 // if(userInfo.permissionLevel_ < userInfo.permissionsThreshold_) 00170 // { 00171 // *out << WebUsers::REQ_NO_LOGIN_RESPONSE; 00172 // __COUT__ << "User (@" << userInfo.ip_ << ") has insufficient permissions: " << userInfo.permissionLevel_ << "<" << 00173 // userInfo.permissionsThreshold_ << std::endl; 00174 // return false; //invalid cookie and present sequence, but not correct sequence 00175 // } 00176 // 00177 // userInfo.setUsername("admin"); 00178 // userInfo.setDisplayName("Admin"); 00179 // userInfo.setUsernameWithLock("admin"); 00180 // userInfo.setActiveUserSessionIndex(0); 00181 // userInfo.setGroupMemebership("admin"); 00182 // 00183 // return true; //successful sequence login! 00184 } 00185 00186 //else proceed with inquiry to Gateway Supervisor 00187 00188 gatewaySupervisor = allSupervisorInfo.getGatewayInfo().getDescriptor(); 00189 00190 if(!gatewaySupervisor) 00191 { 00192 __COUT_ERR__ << "Missing gateway supervisor." << std::endl; 00193 *out << WebUsers::REQ_NO_LOGIN_RESPONSE; 00194 goto HANDLE_ACCESS_FAILURE; //return false, access failed 00195 } 00196 00197 //__COUT__ << std::endl; 00198 00199 parameters.clear(); 00200 parameters.addParameter("CookieCode",userInfo.cookieCode_); 00201 parameters.addParameter("RefreshOption",userInfo.automatedCommand_?"0":"1"); 00202 parameters.addParameter("IPAddress",userInfo.ip_); 00203 00204 retMsg = SOAPMessenger::sendWithSOAPReply(gatewaySupervisor, 00205 "SupervisorCookieCheck", parameters); 00206 00207 parameters.clear(); 00208 parameters.addParameter("CookieCode"); 00209 parameters.addParameter("Permissions"); 00210 parameters.addParameter("UserGroups"); 00211 parameters.addParameter("UserWithLock"); 00212 parameters.addParameter("Username"); 00213 parameters.addParameter("DisplayName"); 00214 parameters.addParameter("ActiveSessionIndex"); 00215 receive(retMsg, parameters); 00216 00217 //first extract a few things always from parameters 00218 // like permissionLevel for this request... must consider allowed groups!! 00219 userInfo.setGroupPermissionLevels(parameters.getValue("Permissions")); 00220 userInfo.cookieCode_ = parameters.getValue("CookieCode"); 00221 userInfo.username_ = parameters.getValue("Username"); 00222 userInfo.displayName_ = parameters.getValue("DisplayName"); 00223 userInfo.usernameWithLock_ = parameters.getValue("UserWithLock"); 00224 userInfo.activeUserSessionIndex_ = strtoul(parameters.getValue("ActiveSessionIndex").c_str(),0,0); 00225 00226 if(!WebUsers::checkRequestAccess(cgi,out,xmldoc,userInfo)) 00227 goto HANDLE_ACCESS_FAILURE; //return false, access failed 00228 //else successful access request! 00229 00230 return true; //request granted 00231 // if(!userInfo.checkLock_ && !userInfo.requireLock_) 00232 // return true; //done, no need to get user info for this cookie code 00233 // 00234 00236 //get user info for cookie code and check lock (now that username is available) 00237 00238 // parameters.clear(); 00239 // parameters.addParameter("CookieCode",userInfo.cookieCode_); 00240 // retMsg = SOAPMessenger::sendWithSOAPReply(gatewaySupervisor, 00241 // "SupervisorGetUserInfo", parameters); 00242 // 00243 // parameters.clear(); 00244 // parameters.addParameter("Username"); 00245 // parameters.addParameter("DisplayName"); 00246 // parameters.addParameter("ActiveSessionIndex"); 00247 // receive(retMsg, parameters); 00248 00249 // if(WebUsers::finalizeRequestAccess(out,xmldoc,userInfo, 00250 // parameters.getValue("Username"), 00251 // parameters.getValue("DisplayName"), 00252 // strtoul(parameters.getValue("ActiveSessionIndex").c_str(),0,0))) 00253 // return true; 00254 // else 00255 // goto HANDLE_ACCESS_FAILURE; //return false, access failed 00256 00257 HANDLE_ACCESS_FAILURE: 00258 00259 //print out return string on failure 00260 if(!userInfo.automatedCommand_) 00261 __COUT_ERR__ << "Failed request (requestType = " << userInfo.requestType_ << 00262 "): " << out->str() << __E__; 00263 return false; //access failed 00264 00265 // tmpUserWithLock_ = parameters.getValue("UserWithLock"); 00266 // tmpUserGroups_ = parameters.getValue("UserGroups"); 00267 // sscanf(parameters.getValue("Permissions").c_str(),"%hhu",&userInfo.permissionLevel_); //unsigned char 00268 // userInfo.setUsernameWithLock(parameters.getValue("UserWithLock")); 00269 // userInfo.setGroupMemebership(parameters.getValue("UserGroups")); 00270 // tmpCookieCode_ = parameters.getValue("CookieCode"); 00271 00272 00273 00274 //else access granted 00275 00276 //__COUT__ << "cookieCode=" << cookieCode << std::endl; 00277 // 00278 // if(!allowNoUser && cookieCode.length() != WebUsers::COOKIE_CODE_LENGTH) 00279 // { 00280 // __COUT__ << "User (@" << ip << ") has invalid cookie code: " << cookieCode << std::endl; 00281 // *out << WebUsers::REQ_NO_LOGIN_RESPONSE; 00282 // return false; //invalid cookie and present sequence, but not correct sequence 00283 // } 00284 // 00285 // if(!allowNoUser && tmpUserPermissions_ < permissionsThreshold) 00286 // { 00287 // *out << WebUsers::REQ_NO_PERMISSION_RESPONSE; 00288 // __COUT__ << "User (@" << ip << ") has insufficient permissions: " << tmpUserPermissions_ << "<" << 00289 // permissionsThreshold << std::endl; 00290 // return false; 00291 // } 00292 00293 //check group membership 00294 // if(!allowNoUser) 00295 // { 00296 // //check groups allowed 00297 // // i.e. if user is a member of one of the groups allowed 00298 // // then grant access 00299 // 00300 // std::set<std::string> userMembership; 00301 // StringMacros::getSetFromString( 00302 // tmpUserGroups_, 00303 // userMembership); 00304 // 00305 // bool accept = false; 00306 // for(const auto& userGroup:userMembership) 00307 // if(StringMacros::inWildCardSet( 00308 // userGroup, 00309 // groupsAllowed)) 00310 // { 00311 // accept = true; 00312 // break; 00313 // } 00314 // 00315 // if(!accept && userMembership.size()) 00316 // { 00317 // *out << WebUsers::REQ_NO_PERMISSION_RESPONSE; 00318 // std::stringstream ss; 00319 // bool first = true; 00320 // for(const auto& group:groupsAllowed) 00321 // if(first && (first=false)) 00322 // ss << group; 00323 // else 00324 // ss << " | " << group; 00325 // 00326 // __COUT__ << "User (@" << ip << ") has insufficient group permissions: " << tmpUserGroups_ << " != " << 00327 // ss.str() << std::endl; 00328 // return false; 00329 // } 00330 // 00331 // //if no access groups specified, then check groups disallowed 00332 // if(!userMembership.size()) 00333 // { 00334 // for(const auto& userGroup:userMembership) 00335 // if(StringMacros::inWildCardSet( 00336 // userGroup, 00337 // groupsDisallowed)) 00338 // { 00339 // *out << WebUsers::REQ_NO_PERMISSION_RESPONSE; 00340 // std::stringstream ss; 00341 // bool first = true; 00342 // for(const auto& group:groupsDisallowed) 00343 // if(first && (first=false)) 00344 // ss << group; 00345 // else 00346 // ss << " | " << group; 00347 // 00348 // __COUT__ << "User (@" << ip << ") is in in a disallowed group permissions: " << tmpUserGroups_ << " == " << 00349 // ss.str() << std::endl; 00350 // return false; 00351 // } 00352 // } 00353 // } //end group membership check 00354 // 00355 // if(xmldoc) //fill with cookie code tag 00356 // { 00357 // if(!allowNoUser) 00358 // xmldoc->setHeader(cookieCode); 00359 // else 00360 // xmldoc->setHeader(WebUsers::REQ_ALLOW_NO_USER); 00361 // } 00362 // 00363 // 00364 // 00365 // if(!userName && !displayName && !activeSessionIndex && !checkLock && !lockRequired) 00366 // return true; //done, no need to get user info for cookie 00367 // 00368 // //__COUT__ << "User with Lock: " << tmpUserWithLock_ << std::endl; 00369 // 00370 // 00371 // ///////////////////////////////////////////////////// 00372 // //get user info 00373 // parameters.clear(); 00374 // parameters.addParameter("CookieCode",cookieCode); 00375 // retMsg = SOAPMessenger::sendWithSOAPReply(gatewaySupervisor, 00376 // "SupervisorGetUserInfo", parameters); 00377 // 00378 // parameters.clear(); 00379 // parameters.addParameter("Username"); 00380 // parameters.addParameter("DisplayName"); 00381 // parameters.addParameter("ActiveSessionIndex"); 00382 // receive(retMsg, parameters); 00383 // 00384 // 00385 // 00386 // 00387 // userInfo.setActiveUserSessionIndex(0); 00388 // 00389 // 00390 // tmpUsername_ = parameters.getValue("Username"); 00391 // userInfo.setUsername(tmpUsername_); 00392 // userInfo.setDisplayName(parameters.getValue("DisplayName")); 00393 // userInfo.setActiveUserSessionIndex( 00394 // strtoul(parameters.getValue("ActiveSessionIndex").c_str(),0,0)); 00395 // 00396 // if(userInfo.checkLock_ && tmpUserWithLock_ != "" && tmpUserWithLock_ != tmpUsername_) 00397 // { 00398 // *out << WebUsers::REQ_USER_LOCKOUT_RESPONSE; 00399 // __COUT__ << "User " << tmpUsername_ << " is locked out. " << tmpUserWithLock_ << " has lock." << std::endl; 00400 // return false; 00401 // } 00402 // 00403 // if(userInfo.lockRequired_ && tmpUserWithLock_ != tmpUsername_) 00404 // { 00405 // *out << WebUsers::REQ_LOCK_REQUIRED_RESPONSE; 00406 // __COUT__ << "User " << tmpUsername_ << " must have lock to proceed. (" << tmpUserWithLock_ << " has lock.)" << std::endl; 00407 // return false; 00408 // } 00409 // 00410 // return true; 00411 } 00412 00413 //======================================================================================================================== 00414 //getActiveUserList 00415 // if lastUpdateTime is not too recent as spec'd by ACTIVE_USERS_UPDATE_THRESHOLD 00416 // if server responds with 00417 std::string RemoteWebUsers::getActiveUserList(XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor) 00418 { 00419 00420 if(1 || time(0) - ActiveUserLastUpdateTime_ > ACTIVE_USERS_UPDATE_THRESHOLD) //need to update 00421 { 00422 00423 __COUT__ << "Need to update " << std::endl; 00424 00425 xoap::MessageReference retMsg = ots::SOAPMessenger::sendWithSOAPReply(supervisorDescriptor,"SupervisorGetActiveUsers"); 00426 00427 00428 SOAPParameters retParameters("UserList"); 00429 receive(retMsg, retParameters); 00430 00431 ActiveUserLastUpdateTime_ = time(0); 00432 return (ActiveUserList_ = retParameters.getValue("UserList")); 00433 } 00434 else 00435 return ActiveUserList_; 00436 } 00437 00438 //======================================================================================================================== 00439 //getLastConfigGroup 00440 // request last "Configured" or "Started" group, for example 00441 // returns empty "" for actionTimeString on failure 00442 // returns "Wed Dec 31 18:00:01 1969 CST" for actionTimeString (in CST) if action never has occurred 00443 std::pair<std::string /*group name*/, ConfigurationGroupKey> RemoteWebUsers::getLastConfigGroup( 00444 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor, 00445 const std::string &actionOfLastGroup, 00446 std::string &actionTimeString) 00447 { 00448 actionTimeString = ""; 00449 xoap::MessageReference retMsg = ots::SOAPMessenger::sendWithSOAPReply( 00450 supervisorDescriptor,"SupervisorLastConfigGroupRequest", 00451 SOAPParameters("ActionOfLastGroup",actionOfLastGroup)); 00452 00453 00454 SOAPParameters retParameters; 00455 retParameters.addParameter("GroupName"); 00456 retParameters.addParameter("GroupKey"); 00457 retParameters.addParameter("GroupAction"); 00458 retParameters.addParameter("GroupActionTime"); 00459 receive(retMsg, retParameters); 00460 00461 std::pair<std::string /*group name*/, ConfigurationGroupKey> theGroup; 00462 if(retParameters.getValue("GroupAction") != actionOfLastGroup) //if action doesn't match.. weird 00463 { 00464 __COUT_WARN__ << "Returned group action '" << retParameters.getValue("GroupAction") << 00465 "' does not match requested group action '" << actionOfLastGroup << ".'" << std::endl; 00466 return theGroup; //return empty and invalid 00467 } 00468 //else we have an action match 00469 00470 theGroup.first = retParameters.getValue("GroupName"); 00471 theGroup.second = strtol(retParameters.getValue("GroupKey").c_str(),0,0); 00472 actionTimeString = retParameters.getValue("GroupActionTime"); 00473 return theGroup; 00474 } 00475 00476 //======================================================================================================================== 00477 //getUserInfoForCookie 00478 // get username and display name for user based on cookie code 00479 // return true, if user info gotten successfully 00480 // else false 00481 bool RemoteWebUsers::getUserInfoForCookie(XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor, 00482 std::string &cookieCode, std::string *userName, std::string *displayName, uint64_t *activeSessionIndex) 00483 { 00484 __COUT__ << std::endl; 00485 if(cookieCode.length() != WebUsers::COOKIE_CODE_LENGTH) return false; //return if invalid cookie code 00486 00487 // SOAPParametersV parameters(1); 00488 // parameters[0].setName("CookieCode"); parameters[0].setValue(cookieCode); 00489 xoap::MessageReference retMsg = SOAPMessenger::sendWithSOAPReply(supervisorDescriptor, "SupervisorGetUserInfo", SOAPParameters("CookieCode",cookieCode)); 00490 00491 SOAPParameters retParameters; 00492 retParameters.addParameter("Username"); 00493 retParameters.addParameter("DisplayName"); 00494 retParameters.addParameter("ActiveSessionIndex"); 00495 receive(retMsg, retParameters); 00496 if(userName) *userName = retParameters.getValue("Username"); 00497 if(displayName) *displayName = retParameters.getValue("DisplayName"); 00498 if(activeSessionIndex) *activeSessionIndex = strtoul(retParameters.getValue("ActiveSessionIndex").c_str(),0,0); 00499 00500 __COUT__ << "userName " << *userName << std::endl; 00501 00502 return true; 00503 } 00504 00505 //======================================================================================================================== 00506 //cookieCodeIsActiveForRequest 00507 // for external supervisors to check with Supervisor for login 00508 bool RemoteWebUsers::cookieCodeIsActiveForRequest(XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor, 00509 std::string &cookieCode, uint8_t *userPermissions, std::string ip, bool refreshCookie, std::string *userWithLock) 00510 { 00511 //__COUT__ << "CookieCode: " << cookieCode << " " << cookieCode.length() << std::endl; 00512 if(cookieCode.length() != WebUsers::COOKIE_CODE_LENGTH) return false; //return if invalid cookie code 00513 00514 // 00515 00516 SOAPParameters parameters; 00517 parameters.addParameter("CookieCode",cookieCode); 00518 parameters.addParameter("RefreshOption",refreshCookie?"1":"0"); 00519 00520 //__COUT__ << "CookieCode: " << cookieCode << std::endl; 00521 xoap::MessageReference retMsg = SOAPMessenger::sendWithSOAPReply(supervisorDescriptor, "SupervisorCookieCheck", parameters); 00522 00523 00524 SOAPParameters retParameters; 00525 retParameters.addParameter("CookieCode"); 00526 retParameters.addParameter("Permissions"); 00527 retParameters.addParameter("UserWithLock"); 00528 receive(retMsg, retParameters); 00529 00530 00531 00532 if(userWithLock) *userWithLock = retParameters.getValue("UserWithLock"); 00533 if(userPermissions) sscanf(retParameters.getValue("Permissions").c_str(),"%hhu",userPermissions); //unsigned char 00534 00535 cookieCode = retParameters.getValue("CookieCode"); 00536 00537 return cookieCode.length() == WebUsers::COOKIE_CODE_LENGTH; //proper cookieCode has length WebUsers::COOKIE_CODE_LENGTH 00538 } 00539 //======================================================================================================================== 00540 //sendSystemMessage 00541 // send system message to toUser through Supervisor 00542 // toUser wild card * is to all users 00543 void RemoteWebUsers::sendSystemMessage(XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor, const std::string& toUser, const std::string& msg) 00544 { 00545 SOAPParameters parameters; 00546 parameters.addParameter("ToUser" , toUser); 00547 parameters.addParameter("Message", msg); 00548 00549 xoap::MessageReference retMsg = SOAPMessenger::sendWithSOAPReply(supervisorDescriptor, "SupervisorSystemMessage",parameters); 00550 } 00551 00552 00553 //======================================================================================================================== 00554 //makeSystemLogbookEntry 00555 // make system logbook through Supervisor 00556 void RemoteWebUsers::makeSystemLogbookEntry(XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor, const std::string& entryText) 00557 { 00558 SOAPParameters parameters; 00559 parameters.addParameter("EntryText", entryText); 00560 00561 xoap::MessageReference retMsg = SOAPMessenger::sendWithSOAPReply(supervisorDescriptor, "SupervisorSystemLogbookEntry",parameters); 00562 } 00563