13 #include "soapCASSsoapProxy.h"
14 #include "CASSsoap.nsmap"
29 client.soap_endpoint =
_server.c_str();
30 client.readini(0, &ret);
32 throw runtime_error(
"TCPClient::reloadIni(): Could not communicate writeini command");
40 client.soap_endpoint =
_server.c_str();
41 client.controlDarkcal(command, &ret);
43 throw runtime_error(
"TCPClient::controlCalibration(): Could not communicate command '"+ command +
"'");
51 client.soap_endpoint =
_server.c_str();
52 int retcode (client.getPostprocessorIds(&ret));
53 if( (retcode != SOAP_OK) || !ret)
56 ss <<
"TCPClient(): Could not retrieve the List of Histograms on '"<<
_server<<
"'";
57 throw runtime_error(ss.str());
59 soap_multipart::iterator attachment (client.dime.begin());
60 if(client.dime.end() == attachment)
63 ss <<
"There is no attachmend in the received soap data";
64 throw runtime_error(ss.str());
72 cass::Serializer serializer( std::string((
char *)(*attachment).ptr, (*attachment).size) );
74 std::list<std::string> returnlist (list.
getList());
85 client.soap_endpoint =
_server.c_str();
86 client.getHistogram(histogramkey,0,&ret);
90 ss <<
"TCPClient(): Did not get Histogram with key '"<<histogramkey<<
"'";
91 throw runtime_error(ss.str());
93 soap_multipart::iterator attachment(client.dime.begin());
94 if(client.dime.end() == attachment)
97 ss <<
"TCPClient(key): There is no attachmend in the received soap data";
98 throw runtime_error(ss.str());
107 cass::Serializer serializer( std::string((
char *)(*attachment).ptr, (*attachment).size) );
108 serializer >> *result;
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
TCPClient(const std::string &server)
constructor
void reloadIni() const
reload .ini file
void controlCalibration(const std::string &command) const
reload .ini file
std::list< std::string > operator()() const
retrieve the list of available histograms
const Processor::names_t & getList()
getter for the internal list
std::string _server
the server to connect to
contains the classes that can serialize the key list
size_t _transferredBytes
the amount of bytes transferred
file contains the classes connect to cass