title: Unable to return class from REST API call
body: <p>I am working on two projects , 1) micro service(MSA) and 2)SDK</p>
  
  <p>I am sending a GET request from the MSA to SDK where I expect to get a JAVA class as the return type , but instead I am returned just the FQDN of the class as a String </p>
  
  <p>MSA code :</p>
  
  <pre><code> @SuppressWarnings("unchecked")
      @Override
      public Map&lt;String, Class&lt;?&gt;&gt; getSettingClasses() {
          try {
              Map&lt;String, String&gt; queryParam = Maps.newHashMap();
              queryParam.put("sid", userContext.getServiceId().toString());
              Map&lt;String, Class&lt;?&gt;&gt; map = restClient.get(
                      commonSettingService.getApplicationCode(commonSettingService.getServiceDefId(userContext
                              .getServiceId())), MasterMaintenanceEndpoint.GET_SETTING_CLASSES, Map.class,
                      userContext.getSessionToken(), queryParam);
              return map;
          } catch (Exception e) {
              logger.error("Can not connect to Master Maintenance service", e);
              return null;
          }
      }
  </code></pre>
  
  <p>SDK code :</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET)
      @ResponseBody
      public Map&lt;String, Class&lt;?&gt;&gt; getSettingClasses() {
          Map&lt;String, Class&lt;?&gt;&gt; clazz = Maps.newHashMap();
          String serviceDefId = getProviderService().getServiceDefId();
          String serviceId = userContext.getServiceId().toString();
          clazz.put("dtoClass", getProviderService().getDtoClass());
          clazz.put("dtoIndexClass", getProviderService().getIndexDtoClass());
          return clazz;
      }
  </code></pre>
  
  <p>Service code :</p>
  
  <pre><code>Map&lt;String, Class&lt;?&gt;&gt; masterMaintenanceClassMap = webApiService.getSettingClasses();
          Class&lt;?&gt; dtoClass = masterMaintenanceClassMap.get("dtoClass");
          Class&lt;?&gt; dtoIndexClass = masterMaintenanceClassMap.get("dtoIndexClass");
  </code></pre>
  
  <p>Within SDK code , <code>getProviderService().getDtoClass()</code> returns a <code>java.lang.Class</code>  type but in Service code , <code>masterMaintenanceClassMap.get("dtoClass")</code> evaluates to a <code>String</code> type whose value is actually FQDN of the class.</p>
  
  <p>Does REST restrict returning a Class ? Is there a workaround for this ?</p>
  
  <p>Note : I am unable to do <code>Class.forName(fqdn)</code> in my service code as it does not have dependency to the class </p>