diff options
author | Steve Smokowski <ss835w@att.com> | 2018-12-12 12:49:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-12 12:49:56 +0000 |
commit | 5d015004a0348d332798665c57dcf5a37220a107 (patch) | |
tree | 12266a2cc092df0cf95f0a1f4829a7a619440e8b /bpmn/MSOCommonBPMN/src/main/java | |
parent | bc7c7d78b62477a7994a986a8e03b180bcbee4c7 (diff) | |
parent | eea9276879c723444c7eaf95ada94ce057d7f6ab (diff) |
Merge "vfc adapter authentication bug fix"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java index 1531e4d7b3..7df9c7bf82 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java @@ -262,6 +262,9 @@ public class ResourceRequestBuilder { String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint"); HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_TOSCA_CSAR).queryParam("serviceModelUuid", uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB); + client.addAdditionalHeader("Accept", "application/json"); +// client.addBasicAuthHeader (UrnPropertiesReader.getVariable("mso.adapters.db.auth"), UrnPropertiesReader.getVariable("mso.msoKey")); + client.addAdditionalHeader("Authorization", UrnPropertiesReader.getVariable("mso.db.auth")); Response response = client.get(); String value = response.readEntity(String.class); @@ -272,7 +275,7 @@ public class ResourceRequestBuilder { File csarFile = new File(filePath); if(!csarFile.exists()) { - throw new Exception("csar file does not exist."); + throw new Exception("csar file does not exist in filePath:" + csarFile.getAbsolutePath()); } return csarFile.getAbsolutePath(); @@ -284,7 +287,7 @@ public class ResourceRequestBuilder { try { return mapper.readValue(jsonstr, type); } catch(IOException e) { - LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "fail to unMarshal json", e); + LOGGER.error("fail to unMarshal json" + e.getMessage ()); } return null; } |