public function wsAddPatient($patient) { try { $soapClient = new SoapClient(CommonProperties::$SIP_WSDL); $token = $soapClient->login(CommonProperties::$SIP_LOGIN, CommonProperties::$SIP_PASSWORD); try { return $soapClient->addPatientWs($token, $patient); } catch (Exception $ex) { return $ex->faultcode; // return $ex; } } catch (Exception $ex) { return $ex->faultcode; } }