function pol_addPolicy($policy, $timeZoneId) { try { $client = new SoapClient(WSDL_QS, array('location' => LOCATION_QS)); $request = array("policy" => $policy, "timeZoneId" => $timeZoneId); $response = $client->addPolicy($request); return array("success" => true, "id" => $response); } catch (Exception $e) { return array("success" => false, "message" => $e->getMessage()); } catch (SoapFault $soapfault) { return array("success" => false, "message" => $soapfault->getMessage()); } }