FALSE, 'message' => 'Empty result', ); } $json_res = json_decode($result, TRUE); if (!$json_res) { return array( 'success' => FALSE, 'message' => 'Result is not in JSON format', ); } if (empty($json_res['alive'])) { return array( 'success' => FALSE, 'message' => 'Service is not alive', ); } return array( 'success' => TRUE, ); } protected function checkSOAPResult($result) { if ($result) { return array( 'success' => TRUE, ); } return array( 'success' => FALSE, 'message' => 'Service is not alive', ); } } ?>