aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-sdnc-adapter')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java1
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java8
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCAdapterCallbackRequest.java4
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java8
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java6
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java4
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java23
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java10
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java8
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java10
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java14
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java7
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java4
13 files changed, 53 insertions, 54 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java
index 543c8e4b00..2c84ed4fd0 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/CXFConfiguration.java
@@ -32,7 +32,6 @@ import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.onap.so.adapters.sdnc.sdncrest.SNIROResponse;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor;
import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor;
import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
index 5deec41d94..26e67c8507 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/SDNCAdapterService.java
@@ -32,8 +32,8 @@ import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,17 +62,17 @@ public class SDNCAdapterService extends Service {
wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCAdapter.wsdl");
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_ADAPTER_WSDL,
- MsoLogger.ErrorCode.DataError.getValue(), "Exception - WSDL not found", e);
+ ErrorCode.DataError.getValue(), "Exception - WSDL not found", e);
}
if(wsdlUrl == null) {
logger.error("{} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_ADAPTER_WSDL,
- MsoLogger.ErrorCode.DataError.getValue(), "WSDL not found");
+ ErrorCode.DataError.getValue(), "WSDL not found");
} else {
try {
logger.info("{} {} {}", MessageEnum.RA_PRINT_URL.toString(), SDNC_ADAPTER_WSDL, wsdlUrl.toURI().toString());
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_WSDL_URL_CONVENTION_EXC.toString(), SDNC_ADAPTER_WSDL,
- MsoLogger.ErrorCode.DataError.getValue(), "Exception - print URL", e);
+ ErrorCode.DataError.getValue(), "Exception - print URL", e);
}
}
WSDL_LOCATION = wsdlUrl;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCAdapterCallbackRequest.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCAdapterCallbackRequest.java
index 3dcd008ba5..2703060761 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCAdapterCallbackRequest.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCAdapterCallbackRequest.java
@@ -33,8 +33,8 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -135,7 +135,7 @@ public class SDNCAdapterCallbackRequest {
}
catch (Exception e)
{
- logger.error("{} {} {}", MessageEnum.RA_MARSHING_ERROR.toString(), MsoLogger.ErrorCode.DataError.getValue(),
+ logger.error("{} {} {}", MessageEnum.RA_MARSHING_ERROR.toString(), ErrorCode.DataError.getValue(),
"Exception - MARSHING_ERROR", e);
}
return "";
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
index fd288c6a04..ee7a467357 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/client/SDNCCallbackAdapterService.java
@@ -31,8 +31,8 @@ import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,18 +59,18 @@ public class SDNCCallbackAdapterService extends Service {
wsdlUrl = Thread.currentThread().getContextClassLoader().getResource("main/resources/SDNCCallbackAdapter.wsdl");
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_CALLBACK_ADAPTER_WSDL, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Exception - WSDL not found", e);
+ ErrorCode.DataError.getValue(), "Exception - WSDL not found", e);
}
if(wsdlUrl == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_WSDL_NOT_FOUND.toString(), SDNC_CALLBACK_ADAPTER_WSDL, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "WSDL not found");
+ ErrorCode.DataError.getValue(), "WSDL not found");
} else {
try {
logger.info("{} {} {} {}", MessageEnum.RA_PRINT_URL.toString(), SDNC_CALLBACK_ADAPTER_WSDL,
wsdlUrl.toURI().toString(), "SDNC");
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_WSDL_URL_CONVENTION_EXC.toString(), SDNC_CALLBACK_ADAPTER_WSDL,
- "SDNC", MsoLogger.ErrorCode.DataError.getValue(), "Exception - URL convention problem", e);
+ "SDNC", ErrorCode.DataError.getValue(), "Exception - URL convention problem", e);
}
}
WSDL_LOCATION = wsdlUrl;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
index 6262f2d86f..401f5c5b2b 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/MapRequestTunables.java
@@ -23,8 +23,8 @@
package org.onap.so.adapters.sdnc.impl;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -65,7 +65,7 @@ public class MapRequestTunables {
String[] parts = value.split("\\|"); //escape pipe
if (parts.length < 3) {
logger.warn("{} {} {} {} {} {}", MessageEnum.RA_SDNC_INVALID_CONFIG.toString(), key, value, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Invalid config");
+ ErrorCode.DataError.getValue(), "Invalid config");
}
for (int i = 0; i < parts.length; i++) {
@@ -101,7 +101,7 @@ public class MapRequestTunables {
}
if (error != null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_SDNC_MISS_CONFIG_PARAM.toString(), key, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Missing config param");
+ ErrorCode.DataError.getValue(), "Missing config param");
}
logger.debug("RequestTunables Key:{} Value:{} Tunables:{}", key, value, this.toString());
return reqTunable;
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java
index cf81ae4be0..104b4ebcc7 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCAdapterPortTypeImpl.java
@@ -29,9 +29,9 @@ import javax.servlet.http.HttpServletResponse;
import org.onap.so.adapters.sdnc.SDNCAdapterPortType;
import org.onap.so.adapters.sdnc.SDNCAdapterRequest;
import org.onap.so.adapters.sdnc.SDNCAdapterResponse;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -75,7 +75,7 @@ public class SDNCAdapterPortTypeImpl implements SDNCAdapterPortType {
catch (Exception e){
String respMsg = "Error sending request to SDNC. Failed to start SDNC Client thread " + e.getMessage();
logger.error("{} {} {} {}", MessageEnum.RA_SEND_REQUEST_SDNC_ERR.toString(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), respMsg, e);
+ ErrorCode.DataError.getValue(), respMsg, e);
SDNCResponse sdncResp = new SDNCResponse(bpelReqId);
sdncResp.setRespCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index d7f2c11d0b..bea4c1bb3b 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -46,6 +46,8 @@ import javax.xml.ws.handler.MessageContext;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
+
+import org.onap.so.logger.ErrorCode;
import org.onap.so.utils.CryptoUtils;
import org.onap.so.adapters.sdnc.SDNCAdapterRequest;
import org.onap.so.adapters.sdnc.client.CallbackHeader;
@@ -54,7 +56,6 @@ import org.onap.so.adapters.sdnc.client.SDNCCallbackAdapterPortType;
import org.onap.so.adapters.sdnc.client.SDNCCallbackAdapterService;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -192,7 +193,7 @@ public class SDNCRestClient{
catch (Exception e)
{
logger.error("{} {} {} {}", MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Exception processing request to SDNC", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Exception processing request to SDNC", e);
//default
sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
String respMsg = "Error processing request to SDNC. ";
@@ -233,7 +234,7 @@ public class SDNCRestClient{
sdncErrMsg = new StringBuilder(". SDNC Returned-[error-type:" + eType);
} catch (Exception e3) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-type",
- error.toString(), "SDNC", MsoLogger.ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
+ error.toString(), "SDNC", ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
}
String eTag = null;
@@ -242,7 +243,7 @@ public class SDNCRestClient{
sdncErrMsg.append(", error-tag:").append(eTag);
} catch (Exception e3) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-tag",
- error.toString(), "SDNC", MsoLogger.ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
+ error.toString(), "SDNC", ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
}
String eMsg = null;
@@ -251,17 +252,17 @@ public class SDNCRestClient{
sdncErrMsg.append(", error-message:").append(eMsg).append("]");
} catch (Exception e3) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-message", error.toString(),
- "SDNC", MsoLogger.ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
+ "SDNC", ErrorCode.DataError.getValue(), EXCEPTION_MSG, e3);
}
}
} catch (Exception e2) {
logger.error("{} {} {} {}", MessageEnum.RA_ANALYZE_ERROR_EXC.toString(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Exception while analyse error", e2);
+ ErrorCode.DataError.getValue(), "Exception while analyse error", e2);
}
} //is != null
} catch (Exception e1) {
logger.error("{} {} {} {}", MessageEnum.RA_ERROR_GET_RESPONSE_SDNC.toString(), "SDNC",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Exception while get SDNC response", e1);
+ ErrorCode.BusinessProcesssError.getValue(), "Exception while get SDNC response", e1);
}
} //con != null
@@ -273,7 +274,7 @@ public class SDNCRestClient{
sdncResp.setRespMsg(respMsg);
logger.error("{} {} {} {}", MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC",
- MsoLogger.ErrorCode.AvailabilityError.getValue(), "Exception while communicate with SDNC", e);
+ ErrorCode.AvailabilityError.getValue(), "Exception while communicate with SDNC", e);
return sdncResp;
}
@@ -304,7 +305,7 @@ public class SDNCRestClient{
} catch (MalformedURLException e1) {
error = "Caught exception initializing Callback wsdl " + e1.getMessage();
logger.error("{} {} {} {}", MessageEnum.RA_INIT_CALLBACK_WSDL_ERR.toString(), CAMUNDA,
- MsoLogger.ErrorCode.DataError.getValue(), "Exception initializing Callback wsdl", e1);
+ ErrorCode.DataError.getValue(), "Exception initializing Callback wsdl", e1);
}
@@ -335,7 +336,7 @@ public class SDNCRestClient{
catch (Exception e2) {
error = "Unable to set authorization in callback request " + e2.getMessage();
logger.error("{} {} {} {}", MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA,
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(),
+ ErrorCode.BusinessProcesssError.getValue(),
"Exception - Unable to set authorization in callback request", e2);
}
@@ -347,7 +348,7 @@ public class SDNCRestClient{
catch (Exception e)
{
error = "Error sending BpelCallback request" + e.getMessage();
- logger.error("Error {} - {} - {}", MsoLogger.ErrorCode.BusinessProcesssError.getValue(),
+ logger.error("Error {} - {} - {}", ErrorCode.BusinessProcesssError.getValue(),
MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), error, e);
}
logger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA);
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
index 96e7dcf51a..daa83d27f8 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/Utils.java
@@ -33,8 +33,8 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
@@ -103,7 +103,7 @@ public class Utils {
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
}
return null;
}
@@ -137,7 +137,7 @@ public class Utils {
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Exception in genSdncPutReq", e);
+ ErrorCode.DataError.getValue(), "Exception in genSdncPutReq", e);
}
return null;
}
@@ -172,7 +172,7 @@ public class Utils {
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_ERROR_CREATE_SDNC_RESPONSE.toString(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Exception in genMsoFailResp", e);
+ ErrorCode.DataError.getValue(), "Exception in genMsoFailResp", e);
}
return null;
}
@@ -198,7 +198,7 @@ public class Utils {
s = s.replaceAll("xmlns=\"\"", "");
return s;
} catch (Exception e) {
- logger.error("{} {} {}", MessageEnum.RA_ERROR_CONVERT_XML2STR.toString(), MsoLogger.ErrorCode.DataError
+ logger.error("{} {} {}", MessageEnum.RA_ERROR_CONVERT_XML2STR.toString(), ErrorCode.DataError
.getValue(), "Exception - domToStr", e);
}
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
index 6a66770d29..cf52972d8f 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/BPRestCallback.java
@@ -36,9 +36,9 @@ import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.adapters.sdnc.impl.Constants;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -134,7 +134,7 @@ public class BPRestCallback {
method.setHeader(ONAPLogConstants.Headers.PARTNER_NAME,"SO-SDNCAdapter");
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA,
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Unable to set authorization in callback request", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Unable to set authorization in callback request", e);
error = true;
}
@@ -150,7 +150,7 @@ public class BPRestCallback {
if (httpResponse.getStatusLine().getStatusCode() >= 300) {
String msg = "Received error response to callback request: " + httpResponse.getStatusLine();
- logger.error("{} {} {} {}", MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA, MsoLogger.ErrorCode
+ logger.error("{} {} {} {}", MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA, ErrorCode
.BusinessProcesssError.getValue(), msg);
}
@@ -158,7 +158,7 @@ public class BPRestCallback {
return true;
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), CAMUNDA,
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Error sending callback request", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Error sending callback request", e);
return false;
} finally {
if (httpResponse != null) {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
index fd9ce4c719..d4c2c57510 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/MapTypedRequestTunablesData.java
@@ -25,9 +25,9 @@ package org.onap.so.adapters.sdnc.sdncrest;
import org.onap.so.adapters.sdnc.exception.SDNCAdapterException;
import org.onap.so.adapters.sdnc.impl.Constants;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -56,7 +56,7 @@ public class MapTypedRequestTunablesData {
if ("".equals(value)) {
error= MISSING_CONFIGURATION_ERROR_MSG + reqTunable.getKey();
logger.error("{} {} {} {} {}", MessageEnum.RA_SDNC_MISS_CONFIG_PARAM.toString(), reqTunable.getKey(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
+ ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
throw new SDNCAdapterException(error);
}
@@ -66,7 +66,7 @@ public class MapTypedRequestTunablesData {
if (parts.length != 5) {
error="Invalid configuration for: " + reqTunable.getKey();
logger.error("{} {} {} {} {} {}", MessageEnum.RA_SDNC_INVALID_CONFIG.toString(), reqTunable.getKey(), value, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Invalid config");
+ ErrorCode.DataError.getValue(), "Invalid config");
throw new SDNCAdapterException(error);
}
@@ -82,7 +82,7 @@ public class MapTypedRequestTunablesData {
if ("".equals(reqTunable.getSdncUrl())) {
error=MISSING_CONFIGURATION_ERROR_MSG + urlPropKey;
logger.error("{} {} {} {} {}", MessageEnum.RA_SDNC_MISS_CONFIG_PARAM.toString(), urlPropKey, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
+ ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
throw new SDNCAdapterException(error);
}
@@ -100,7 +100,7 @@ public class MapTypedRequestTunablesData {
if ("".equals(reqTunable.getMyUrl())) {
error=MISSING_CONFIGURATION_ERROR_MSG + Constants.MY_URL_PROP;
logger.error("{} {} {} {} {}", MessageEnum.RA_SDNC_MISS_CONFIG_PARAM.toString(), Constants.MY_URL_PROP, "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
+ ErrorCode.DataError.getValue(), MISSING_CONFIG_PARAM_ERROR_MSG);
throw new SDNCAdapterException(error);
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
index 06e7ab23a6..7cc5b8e14e 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCConnector.java
@@ -52,9 +52,9 @@ import org.apache.http.util.EntityUtils;
import org.onap.so.adapters.sdnc.impl.Constants;
import org.onap.so.adapters.sdncrest.SDNCErrorCommon;
import org.onap.so.adapters.sdncrest.SDNCResponseCommon;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -201,12 +201,12 @@ public abstract class SDNCConnector {
protected void logError(String errMsg) {
logger.error("{} {} {} {}", MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC",
- MsoLogger.ErrorCode.AvailabilityError.getValue(), errMsg);
+ ErrorCode.AvailabilityError.getValue(), errMsg);
}
protected void logError(String errMsg, Throwable t) {
logger.error("{} {} {} {}", MessageEnum.RA_EXCEPTION_COMMUNICATE_SDNC.toString(), "SDNC",
- MsoLogger.ErrorCode.AvailabilityError.getValue(), errMsg, t);
+ ErrorCode.AvailabilityError.getValue(), errMsg, t);
}
/**
@@ -290,7 +290,7 @@ public abstract class SDNCConnector {
info += "error-type:" + errorType;
} catch (XPathExpressionException e) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-type", error.toString(),
- "SDNC", MsoLogger.ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
+ "SDNC", ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
}
try {
@@ -301,7 +301,7 @@ public abstract class SDNCConnector {
info += "error-tag:" + errorTag;
} catch (XPathExpressionException e) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-tag", error.toString(),
- "SDNC", MsoLogger.ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
+ "SDNC", ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
}
try {
@@ -312,7 +312,7 @@ public abstract class SDNCConnector {
info += "error-message:" + errorMessage;
} catch (Exception e) {
logger.error("{} {} {} {} {} {}", MessageEnum.RA_EVALUATE_XPATH_ERROR.toString(), "error-message",
- error.toString(), "SDNC", MsoLogger.ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
+ error.toString(), "SDNC", ErrorCode.DataError.getValue(), XPATH_EXCEPTION, e);
}
if (!info.isEmpty()) {
@@ -325,7 +325,7 @@ public abstract class SDNCConnector {
}
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_ANALYZE_ERROR_EXC.toString(), "SDNC",
- MsoLogger.ErrorCode.DataError.getValue(), "Exception while analyzing errors", e);
+ ErrorCode.DataError.getValue(), "Exception while analyzing errors", e);
}
return output.toString();
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index d0973d3c44..a42e92db4b 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -39,8 +39,8 @@ import org.onap.so.adapters.sdncrest.RequestInformation;
import org.onap.so.adapters.sdncrest.SDNCResponseCommon;
import org.onap.so.adapters.sdncrest.SDNCServiceError;
import org.onap.so.adapters.sdncrest.SDNCServiceRequest;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -65,7 +65,6 @@ public class SDNCServiceRequestTask {
@Async
public void runRequest(SDNCServiceRequest request,String msoRequestId,String msoServiceInstanceId,String myUrlSuffix)
{
- MsoLogger.setLogContext(msoRequestId, msoServiceInstanceId);
String sdncRequestId = request.getSdncRequestId();
String sdncService = request.getSdncService();
@@ -193,7 +192,7 @@ public class SDNCServiceRequestTask {
addTextChild(agnosticServiceInformation, "anydata", anydata);
} catch (Exception e) {
logger.error("{} {} {} {}", MessageEnum.RA_ERROR_CREATE_SDNC_REQUEST.toString(), "SDNC",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Exception in genSdncReq", e);
return null;
}
@@ -211,7 +210,7 @@ public class SDNCServiceRequestTask {
transformer.transform(new DOMSource(doc), new StreamResult(writer));
xml = writer.toString();
} catch (Exception e) {
- logger.error("{} {} {}", MessageEnum.RA_ERROR_CONVERT_XML2STR.toString(), MsoLogger.ErrorCode.DataError.getValue(),
+ logger.error("{} {} {}", MessageEnum.RA_ERROR_CONVERT_XML2STR.toString(), ErrorCode.DataError.getValue(),
"Exception - domToStr", e);
return null;
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java
index 75a0b07643..96153a18fa 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SNIROResponse.java
@@ -33,9 +33,9 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.onap.so.adapters.sdnc.impl.Constants;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -72,7 +72,7 @@ public class SNIROResponse {
if (bpUrl == null || ("").equals(bpUrl)) {
String error = "Missing configuration for: " + Constants.BPEL_REST_URL_PROP;
logger.error("{} {} {} {} {}", MessageEnum.RA_SDNC_MISS_CONFIG_PARAM.toString(), Constants.BPEL_REST_URL_PROP,
- "SDNC", MsoLogger.ErrorCode.DataError.getValue(), "Missing config param");
+ "SDNC", ErrorCode.DataError.getValue(), "Missing config param");
return Response.status(HttpServletResponse.SC_BAD_REQUEST).entity(error).build();
}