Replace boost thread with std thread; update rest book example; move soap tutorials to wiki.
This commit is contained in:
@@ -11,7 +11,11 @@ bool CalcService::Handle(const webcc::SoapRequest& soap_request,
|
||||
webcc::SoapResponse* soap_response) {
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
if (!GetParameters(soap_request, &x, &y)) {
|
||||
try {
|
||||
x = std::stod(soap_request.GetParameter("x"));
|
||||
y = std::stod(soap_request.GetParameter("y"));
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERRO("SoapParameter cast error: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,16 +65,3 @@ bool CalcService::Handle(const webcc::SoapRequest& soap_request,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CalcService::GetParameters(const webcc::SoapRequest& soap_request,
|
||||
double* x, double* y) {
|
||||
try {
|
||||
*x = std::stod(soap_request.GetParameter("x"));
|
||||
*y = std::stod(soap_request.GetParameter("y"));
|
||||
} catch (const std::exception& e) {
|
||||
LOG_ERRO("SoapParameter cast error: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,6 @@ class CalcService : public webcc::SoapService {
|
||||
|
||||
bool Handle(const webcc::SoapRequest& soap_request,
|
||||
webcc::SoapResponse* soap_response) override;
|
||||
|
||||
private:
|
||||
bool GetParameters(const webcc::SoapRequest& soap_request,
|
||||
double* x, double* y);
|
||||
};
|
||||
|
||||
#endif // CALC_SERVICE_H_
|
||||
|
||||
Reference in New Issue
Block a user