aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java22
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java13
2 files changed, 22 insertions, 13 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java b/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
index a09587c..a7e3356 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
@@ -15,6 +15,11 @@
*/
package org.onap.nbi.apis.serviceorder;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
import org.onap.nbi.OnapComponentsUrlPaths;
import org.onap.nbi.apis.serviceorder.model.consumer.SubscriberInfo;
import org.onap.nbi.exceptions.BackendFunctionalException;
@@ -22,17 +27,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.*;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
+import org.springframework.web.client.ResourceAccessException;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
@Service
public class MultiClient {
@@ -179,7 +183,7 @@ public class MultiClient {
+ response.getBody().toString());
}
return response;
- } catch (BackendFunctionalException e) {
+ } catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error("error on calling " + callUrl + " ," + e);
return null;
}
@@ -209,7 +213,7 @@ public class MultiClient {
}
return response;
- } catch (BackendFunctionalException e) {
+ } catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error("error on calling " + callURL + " ," + e);
return null;
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
index e0daa23..3dba422 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/SoClient.java
@@ -24,8 +24,13 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.*;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
+import org.springframework.web.client.ResourceAccessException;
import org.springframework.web.client.RestTemplate;
@Service
@@ -68,7 +73,7 @@ public class SoClient {
logResponsePost(url, response);
return response;
- } catch (BackendFunctionalException e) {
+ } catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return null;
}
@@ -90,7 +95,7 @@ public class SoClient {
logResponsePost(url, response);
return response;
- } catch (BackendFunctionalException e) {
+ } catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return null;
}
@@ -118,7 +123,7 @@ public class SoClient {
logResponseGet(url, response);
return response.getBody();
- } catch (BackendFunctionalException e) {
+ } catch (BackendFunctionalException|ResourceAccessException e) {
LOGGER.error(ERROR_ON_CALLING + url + " ," + e);
return null;
}