+ /* It is not recommendable to use the implementation class org.apache.cxf.jaxrs.impl.ResponseImpl in the code,
+ but had to force this in-order to prevent conflict with the ResponseImpl class of Jersey Client which
+ doesn't work as expected. Created Portal-253 for tracking */
+ String str = ((ResponseImpl)cres).readEntity(String.class);
+
+ try {
+ if(t.getClass().getName().equals(String.class.getName())){
+ t=(T) str;
+
+ }else{
+ t = (T) gson.fromJson(str, t.getClass());
+ }
+
+ } catch (Exception e) {
+ EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);
+ }
+
+ //t = (T) cres.readEntity(t.getClass());