logger.debug(EELFLoggerDelegate.debugLogger, "http response status=" + status);
MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE, Integer.toString(status));
if (!isHttpSuccess(status)) {
- String errMsg = "Failed. Status=" + status + restPath +"; [" + ((ResponseImpl)response).getStatusInfo().getReasonPhrase().toString()
+ String errMsg = "Failed. Status=" + status + restPath +"; [" + ((ResponseImpl)response).getStatusInfo().getReasonPhrase()
+ "]";
URL url = null;
try {
Response response = getResponse(appId, restPath);
if (response != null) {
- //verifyResponse(response);
verifyResponse(response,restPath);
/* 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
Response response = getResponse(appId, restPath);
if (response != null) {
- //verifyResponse(response);
verifyResponse(response,restPath);
/* 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 incomingJson = ((ResponseImpl)response).readEntity(String.class);
- return incomingJson;
+ return ((ResponseImpl)response).readEntity(String.class);
}
return "";
Response response = getResponse(appId, restPath);
if (response != null) {
- //verifyResponse(response);
verifyResponse(response,restPath);
String str = ((ResponseImpl)response).readEntity(String.class);
EcompPortalUtils.logAndSerializeObject(logger, restPath, "GET result =", str);
try {
t = mapper.readValue(str, clazz);
} catch (Exception e) {
- e.printStackTrace();
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);
}
}
}
if (response != null) {
- //verifyResponse(response);
verifyResponse(response,restPath);
- // String contentType = response.getHeaderString("Content-Type");
if (clazz != null) {
String str = ((ResponseImpl)response).readEntity(String.class);
EcompPortalUtils.logAndSerializeObject(logger, restPath, "POST result =", str);
try {
t = (T) gson.fromJson(str, clazz);
-
- //t = gson.fromJson(str, clazz);
} catch (Exception e) {
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);
}
}
if (response != null) {
- //verifyResponse(response);
verifyResponse(response,restPath);
String str = ((ResponseImpl)response).readEntity(String.class);
EcompPortalUtils.logAndSerializeObject(logger, restPath, "PUT result =", str);