CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
stor::soaputils Namespace Reference

Functions

xoap::MessageReference createFsmSoapResponseMsg (const std::string commandName, const std::string currentState)
 
std::string extractParameters (xoap::MessageReference, xdaq::Application *)
 

Function Documentation

xoap::MessageReference stor::soaputils::createFsmSoapResponseMsg ( const std::string  commandName,
const std::string  currentState 
)

Create a SOAP FSM response message

Definition at line 38 of file SoapUtils.cc.

References alignCSCRings::e, and edm::hlt::Exception.

Referenced by smproxy::SMProxyServer::handleFSMSoapMessage(), evf::FUResourceBroker::handleFSMSoapMessage(), and stor::StorageManager::handleFSMSoapMessage().

42  {
43  xoap::MessageReference reply;
44 
45  try
46  {
47  // response string
48  reply = xoap::createMessage();
49  xoap::SOAPEnvelope envelope = reply->getSOAPPart().getEnvelope();
50  xoap::SOAPName responseName = envelope.createName(commandName+"Response",
51  "xdaq",XDAQ_NS_URI);
52  xoap::SOAPBodyElement responseElem =
53  envelope.getBody().addBodyElement(responseName);
54 
55  // state string
56  xoap::SOAPName stateName = envelope.createName("state", "xdaq",XDAQ_NS_URI);
57  xoap::SOAPElement stateElem = responseElem.addChildElement(stateName);
58  xoap::SOAPName attributeName = envelope.createName("stateName", "xdaq",XDAQ_NS_URI);
59  stateElem.addAttribute(attributeName,currentState);
60  }
61  catch(xcept::Exception &e)
62  {
63  XCEPT_RETHROW(xoap::exception::Exception,
64  "Failed to create FSM SOAP response message for command '" +
65  commandName + "' and current state '" + currentState + "'.", e);
66  }
67 
68  return reply;
69  }
std::string stor::soaputils::extractParameters ( xoap::MessageReference  msg,
xdaq::Application *  app 
)

Collection of utility functions for handling SOAP messages

Author:
mommsen
Revision:
1.4
Date:
2011/03/07 15:31:32

Extract parameters and FSM command from SOAP message

Definition at line 25 of file SoapUtils.cc.

References edmPickEvents::command, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by smproxy::SMProxyServer::handleFSMSoapMessage(), and stor::StorageManager::handleFSMSoapMessage().

26  {
28 
29  // Extract the command name and update any configuration parameter
30  // found in the SOAP message in the application infospace
31  xdaq2rc::SOAPParameterExtractor soapParameterExtractor(app);
32  command = soapParameterExtractor.extractParameters(msg);
33  return command;
34  }