message: Fix uses of deprecated methods in project
diff: @@ -214,9 +214,12 @@ bool RPCHandlerImpl::ConvertMessageToSO(
  message.function_id(),
  message.type(),
  message.correlation_id());
  +
  + rpc::ValidationReport report("RPC");
  +
  if (!conversion_result ||
  !mobile_so_factory().attachSchema(output, true) ||
  - ((output.validate() != smart_objects::Errors::OK))) {
  + ((output.validate(&report) != smart_objects::Errors::OK))) {
  LOG4CXX_WARN(logger_,
  "Failed to parse string to smart object :"
  << message.json_message());
  @@ -226,6 +229,9 @@ bool RPCHandlerImpl::ConvertMessageToSO(
  message.function_id(),
  message.correlation_id(),
  mobile_apis::Result::INVALID_DATA));
  +
  + (*response)[strings::msg_params][strings::info] =
  + rpc::PrettyFormat(report);
  app_manager_.GetRPCService().ManageMobileCommand(
  response, commands::Command::SOURCE_SDL);
  return false;
  @@ -275,8 +281,18 @@ bool RPCHandlerImpl::ConvertMessageToSO(
  LOG4CXX_WARN(logger_, "Failed to attach schema to object.");
  return false;
  }
  - if (output.validate() != smart_objects::Errors::OK) {
  - LOG4CXX_ERROR(logger_, "Incorrect parameter from HMI");
  +
  + rpc::ValidationReport report("RPC");
  +
  + if (output.validate(&report) != smart_objects::Errors::OK) {
  + LOG4CXX_ERROR(logger_,
  + "Incorrect parameter from HMI"
  + << rpc::PrettyFormat(report));
  +
  + output.erase(strings::msg_params);
  + output[strings::params][hmi_response::code] =
  + hmi_apis::Common_Result::INVALID_DATA;
  + output[strings::msg_params][strings::info] = rpc::PrettyFormat(report);
  return false;
  }
  break;
  