$result = $client->getDevaInsInfo($params1);
         echo json_encode($result);
     } catch (SoapFault $soapfault) {
         //echo $soapfault->getMessage();
         echo $soapfault->getTraceAsString();
     } catch (Exception $e) {
         echo $e->getMessage();
     }
 } else {
     if ($action == 'getVMInsInfo') {
         header('Content-Type: text/x-json');
         $id = $_POST['id'];
         try {
             $params1 = array('id' => $id);
             $client = new SoapClient($wsdl, array('location' => $location));
             $result = $client->getVMInsInfo($params1);
             echo json_encode($result);
         } catch (SoapFault $soapfault) {
             //echo $soapfault->getMessage();
             echo $soapfault->getTraceAsString();
         } catch (Exception $e) {
             echo $e->getMessage();
         }
     } else {
         if ($action == 'scheduleRecurringAppointments') {
             header('Content-Type: text/x-json');
             if (isset($_POST['requestingUser'])) {
                 $requestingUser = $_POST['requestingUser'];
                 $username = $_POST['username'];
                 $appointments = $_POST['appointments'];
                 $requestType = $_POST['requestType'];