I have the following two webservices defined in my controller (update_name and update_definition). I am testing these two webservices
on my local eclipse setup and then deploying it on RHEL OS using Tomcat. Both the webservices works fine on local eclipse setup when I used the following URLs
for local testing

For update_name


Java Code:
 http://localhost:8080/MyProject/update_name?id=1234&name=localNameTest
 http://localhost:8080/MyProject/update_definition?id=1234&definition=localdefinitionTest
I can see the following JSON response for the above two webservice calls respectively:


Java Code:
 {
      "status" : "SUCCESS",
      "message" : "Updated Name!"
    }
    
    {
      "status" : "SUCCESS",
      "message" : "Updated Definition Name!"
    }
However, when I try to run the same two webservices on my server, for some reason the name parameter isn't reaching the
controller for update_name webservice and I end up getting the following error all time :


Java Code:
 {
      "status" : "ERROR",
      "message" : "Invalid Name Parameter"
    }
I see New Name value in the log as empty for this line
Java Code:
logger.info("update__name ws params :ID " +id+" New  Name:"+name);
where
as it shows up in my local setup eclipse console logs

On the other hand,on the server, the webservice update_definition works perfectly fine as it works on local eclipse setup and I get the same success
message as I get in local :

Java Code:
  {
      "status" : "SUCCESS",
      "message" : "Updated Definition Name!"
    }

Does anyone know what wrong I could be doing? I can't figure out as things are working perfectly fine in my local eclipse setup.
1) On the server, I have even did mvn clean on the project and then built it but it didn't help.
2) I have even tried changing the request parameter name to testName, something like the following but it didn't work :
Java Code:
 @RequestParam(value = "testName", defaultValue = "") String testName

Controller for webservice update_name:
Java Code:
        @RequestMapping(value = "/update_name", method = RequestMethod.GET)
        public String updateName
        (
         @RequestParam(value = "id", defaultValue = "0") Integer id,
         @RequestParam(value = "name", defaultValue = "") String name
    
        ) {
    
      String wsStatusJsonString = null;
      logger.info("-----------------------------------------------------------------------------------------------------------");
      logger.info("update__name ws params :ID " + id + " New  Name:" + name);
      boolean updateStatus = true;
    
      try {
    
       // Validate the input parameters.
       if (id < 1) {
        throw new Exception("Invalid ID parameter");
       }
       if (StringUtils.isNullOrEmpty(name)) {
        throw new Exception("Invalid  Name Parameter");
       }
       EmployeeDao employeeDao = (EmployeeDao) context.getBean("employeeDao");
       Company company = null;
       List < Company > companyList = employeeDao.findByEmployeeId(id);
    
       if ((companyList != null) && (!companyList.isEmpty())) {
        company = companyList.get(0);
        company.setName(name);
        updateStatus = employeeDao.insertOrUpdate(company);
        logger.info("update__name:" + updateStatus);
        if (updateStatus) {
         wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(true, "Updated  Name!", true);
        } else {
         wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(false, "Unable to update  Name!", true);
        }
    
       }
    
      } catch (Throwable th) {
       th.printStackTrace();
       wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(false, th.getMessage(), true);
      }
    
      return wsStatusJsonString;
     }
Controller for webservice update_definition:

Java Code:
  @RequestMapping(value = "/update_definition", method = RequestMethod.GET)
      public String updateDefinition
      (
       @RequestParam(value = "id", defaultValue = "0") Integer id,
       @RequestParam(value = "definition", defaultValue = "") String definition
    
      ) {
    
       String wsStatusJsonString = null;
       logger.info("-----------------------------------------------------------------------------------------------------------");
       logger.info("update__definition ws params :ID " + id + " New  Name:" + definition);
       boolean updateStatus = true;
       try {
        // Validate the input parameters.
        if (id < 1) {
         throw new Exception("Invalid ID parameter");
        }
        if (StringUtils.isNullOrEmpty(definition)) {
         throw new Exception("Invalid  Definition Parameter");
        }
        EmployeeDao employeeDao = (EmployeeDao) context.getBean("employeeDao");
        Company company = null;
        List < Company > companyList = employeeDao.findByEmployeeId(id);
    
        if ((companyList != null) && (!companyList.isEmpty())) {
         company = companyList.get(0);
         company.setDefinition(definition);
         updateStatus = employeeDao.insertOrUpdate(company);
         logger.info("update__definition:" + updateStatus);
         if (updateStatus) {
          wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(true, "Updated Definition Name!", true);
         } else {
          wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(false, "Unable to update Definition Name!", true);
         }
    
        }
    
       } catch (Throwable th) {
        th.printStackTrace();
        wsStatusJsonString = GenericOrmStatusView.OrmStatusToJsonString(false, th.getMessage(), true);
       }
    
       return wsStatusJsonString;
      }