Add portal property; correct docker build script. 91/6091/3
authorChristopher Lott (cl778h) <clott@research.att.com>
Thu, 20 Jul 2017 12:31:57 +0000 (08:31 -0400)
committerChristopher Lott (cl778h) <clott@research.att.com>
Thu, 20 Jul 2017 15:51:24 +0000 (11:51 -0400)
New Portal property services.widget.protocol controls whether http or https
protocol is used to access the widget microservice endpoints.

Adjust build script to use new name "sdk" when building Docker with Portal apps
(formerly named ecompsdkos).

Change-Id: I25b7f39d40351da04c7a9dc3cc1c75ddad2750ea
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
14 files changed:
.gitignore
deliveries/.gitignore [new file with mode: 0644]
deliveries/dbstop.sh
deliveries/os_build_febe.sh
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogMarkupControllerTest.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/MicroserviceController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
ecomp-portal-BE-os/README.md

index eb3edf4..08f69cf 100644 (file)
@@ -1 +1,5 @@
-.idea/workspace.xml
\ No newline at end of file
+/.idea/workspace.xml
+/.project
+/.settings
+/dmaapbc
+/sdk
diff --git a/deliveries/.gitignore b/deliveries/.gitignore
new file mode 100644 (file)
index 0000000..f12ac3a
--- /dev/null
@@ -0,0 +1 @@
+/PROJECT
index 6fb7dc3..319b28b 100644 (file)
@@ -1,2 +1,2 @@
 docker stop ecompdb_portal
-docker  rm ecompdb_portal
\ No newline at end of file
+docker  rm ecompdb_portal
index c911089..d9a59bf 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# Builds docker with three webapps: portal app, portal-sdk app, dbc app
 # Stop on error; show output
 set -e -x
 
@@ -36,7 +37,7 @@ cp -r ecomp-portal-BE-common $PROJECTDIR/ecomp-portal-BE-common
 cp -r ecomp-portal-BE-os     $PROJECTDIR/ecomp-portal-BE-os
 cp -r ecomp-portal-DB-common $PROJECTDIR/ecomp-portal-DB-common
 cp -r ecomp-portal-DB-os     $PROJECTDIR/ecomp-portal-DB-os
-cp -r ecompsdkos/ecomp-sdk   $PROJECTDIR/ecomp-sdk
+cp -r sdk/ecomp-sdk          $PROJECTDIR/ecomp-sdk
 
 cd $PROJECTDIR/ecomp-portal-BE-common
 ${MVN} install
index 4c14d8a..567446e 100644 (file)
@@ -165,7 +165,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
                PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
                expectedportalRestResponse.setMessage("FAILURE");
                expectedportalRestResponse.setResponse(
-                               "I/O error on GET request for \"https://null/widget/microservices/widgetCatalog/service/1\":null; nested exception is java.net.UnknownHostException: null");
+                               "I/O error on GET request for \""  + EcompPortalUtils.widgetMsProtocol() + "://null/widget/microservices/widgetCatalog/service/1\":null; nested exception is java.net.UnknownHostException: null");
                PortalRestStatusEnum portalRestStatusEnum = null;
                expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
                PowerMockito.mockStatic(WidgetServiceHeaders.class);
@@ -209,7 +209,6 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
        @SuppressWarnings("unchecked")
        @Test
        public void deleteMicroserviceWhenNoWidgetsAssociatedTest() throws Exception {
-               String HTTPS = "https://";
                PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
                expectedportalRestResponse.setMessage("SUCCESS");
                expectedportalRestResponse.setResponse("");
@@ -223,7 +222,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
                ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
                };
                Mockito.when(template.exchange(
-                               HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+                               EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/service/" + 1,
                                HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef)).thenReturn(ans);
                PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
index 1ba4c78..60a9b7a 100644 (file)
@@ -19,6 +19,7 @@ import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
 import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalapp.test.framework.MockitoTestSuite;
 import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.util.SystemProperties;
 import org.powermock.api.mockito.PowerMockito;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
@@ -62,7 +63,7 @@ public class WidgetsCatalogMarkupControllerTest extends MockitoTestSuite {
        {
                String whatService = "widgets-service";
                PowerMockito.mockStatic(WidgetServiceHeaders.class);
-               Mockito.when(template.getForObject("https://" + consulHealthService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class,
+               Mockito.when(template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class,
                                WidgetServiceHeaders.getInstance())).thenReturn("Success");
                String response = widgetsCatalogMarkupController.getWidgetMarkup(mockedRequest, mockedResponse, 1);
                assertTrue(response.equals("Success")); 
index bc21dd9..42a62b5 100644 (file)
@@ -33,6 +33,7 @@ import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
 import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
 import org.openecomp.portalapp.portal.service.ConsulHealthService;
 import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -54,8 +55,6 @@ import org.springframework.web.client.RestTemplate;
 @EPAuditLog
 public class MicroserviceController extends EPRestrictedBaseController {
        
-       private static final String HTTPS = "https://";
-       
        String whatService = "widgets-service";
        RestTemplate template = new RestTemplate();
 
@@ -64,7 +63,7 @@ public class MicroserviceController extends EPRestrictedBaseController {
 
        @Autowired
        private MicroserviceService microserviceService;
-       
+
        @RequestMapping(value = { "/portalApi/microservices" }, method = RequestMethod.POST)
        public PortalRestResponse<String> createMicroservice(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody MicroserviceData newServiceData) throws Exception {
@@ -114,7 +113,7 @@ public class MicroserviceController extends EPRestrictedBaseController {
                        };
                        // If this service is assoicated with widgets, cannnot be deleted
                        ResponseEntity<List<WidgetCatalog>> ans = (ResponseEntity<List<WidgetCatalog>>) template.exchange(
-                                       HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+                                       EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
                                                        + "/widget/microservices/widgetCatalog/service/" + serviceId,
                                        HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef);
                        List<WidgetCatalog> widgets = ans.getBody();
index b576161..662de30 100644 (file)
@@ -77,8 +77,10 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl
        private static final String MACHINE_LEARNING_SERVICE_CTX = "/ml_api";
        private static final String REGISTER_ACTION = MACHINE_LEARNING_SERVICE_CTX + "/" + "registerAction";
        private static final String CONSUL_ML_SERVICE_ID = "machine-learning";
-       private static final String SERVICE_PROTOCOL = "http";
        private static final String APP_KEY = "uebkey";
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebAnalyticsExtAppController.class);
+       private AsyncRestTemplate restTemplate = new AsyncRestTemplate();
+
 
        @Autowired
        AuditService auditService;
@@ -86,10 +88,6 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl
        @Autowired
        AppsCacheService appCacheService;
 
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebAnalyticsExtAppController.class);
-
-       private AsyncRestTemplate restTemplate = new AsyncRestTemplate();
-
        SuccessCallback<ResponseEntity<String>> successCallback = new SuccessCallback<ResponseEntity<String>>() {
                @Override
                public void onSuccess(ResponseEntity<String> arg) {
@@ -230,7 +228,7 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl
 
                // send it!
                ListenableFuture<ResponseEntity<String>> out = restTemplate.exchange(
-                               SERVICE_PROTOCOL + "://"
+                               EcompPortalUtils.widgetMsProtocol() + "://"
                                                + consulHealthService.getServiceLocation(CONSUL_ML_SERVICE_ID,
                                                                SystemProperties.getProperty("microservices.m-learn.local.port"))
                                                + REGISTER_ACTION,
index 9ac81e9..84150b5 100644 (file)
@@ -44,6 +44,8 @@ import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
 import org.openecomp.portalapp.portal.service.ConsulHealthService;
 import org.openecomp.portalapp.portal.service.MicroserviceService;
 import org.openecomp.portalapp.portal.service.WidgetParameterService;
+import org.openecomp.portalapp.portal.utils.CustomLoggingFilter;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalapp.util.EPUserUtils;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.util.SystemProperties;
@@ -76,8 +78,6 @@ import org.springframework.web.multipart.commons.CommonsMultipartResolver;
 @EPAuditLog
 public class WidgetsCatalogController extends EPRestrictedBaseController {
 
-       private static final String HTTPS = "https://";
-
        EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogController.class);
        RestTemplate template = new RestTemplate();
        String whatService = "widgets-service";
@@ -106,16 +106,16 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
                                }
                                return false;
                        }
-               });
+               });             
        }
 
        @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{loginName}" }, method = RequestMethod.GET)
        public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("loginName") String loginName) throws RestClientException, Exception {
                List<WidgetCatalog> widgets = new ArrayList<>();
-               try {
+               try {CustomLoggingFilter d;
                        ResponseEntity<ArrayList> ans = template.exchange(
-                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                       EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                        SystemProperties.getProperty("microservices.widget.local.port"))
                                                        + "/widget/microservices/widgetCatalog/" + loginName,
                                        HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
@@ -133,9 +133,11 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
        public List<WidgetCatalog> getWidgetCatalog(HttpServletRequest request, HttpServletResponse response)
                        throws RestClientException, Exception {
                List<WidgetCatalog> widgets = new ArrayList<>();
+               
+               String p = EcompPortalUtils.widgetMsProtocol();
                try {
                        ResponseEntity<ArrayList> ans = template.exchange(
-                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                       EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                        SystemProperties.getProperty("microservices.widget.local.port"))
                                                        + "/widget/microservices/widgetCatalog",
                                        HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
@@ -155,7 +157,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
                        @RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId)
                        throws RestClientException, Exception {
                template.exchange(
-                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                               EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/" + widgetId,
                                HttpMethod.PUT, new HttpEntity(newWidgetCatalog, WidgetServiceHeaders.getInstance()), String.class);
@@ -165,7 +167,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
        public void deleteOnboardingWidget(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
                template.exchange(
-                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                               EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/" + widgetId,
                                HttpMethod.DELETE, new HttpEntity(WidgetServiceHeaders.getInstance()), String.class);
@@ -192,7 +194,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
                        multipartRequest.add("file", new FileSystemResource(tmp_folder + fileName));
                        multipartRequest.add("widget", request.getParameter("newWidget"));
                        respond = template.postForObject(
-                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                       EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                        SystemProperties.getProperty("microservices.widget.local.port"))
                                                        + "/widget/microservices/widgetCatalog/" + widgetId,
                                        new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
@@ -233,7 +235,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
                        multipartRequest.add("widget", request.getParameter("newWidget"));
 
                        respond = template.postForObject(
-                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                       EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                        SystemProperties.getProperty("microservices.widget.local.port"))
                                                        + "/widget/microservices/widgetCatalog",
                                        new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
@@ -255,7 +257,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
        @RequestMapping(value = "/portalApi/microservices/{widgetId}/framework.js", method = RequestMethod.GET)
        public String getWidgetFramework(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
-               return template.getForObject(HTTPS
+               return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
                                + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                + "/widget/microservices/" + widgetId + "/framework.js", String.class,
@@ -265,7 +267,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
        @RequestMapping(value = "/portalApi/microservices/{widgetId}/controller.js", method = RequestMethod.GET)
        public String getWidgetController(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
-               return template.getForObject(HTTPS
+               return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
                                + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                + "/widget/microservices/" + widgetId + "/controller.js", String.class,
@@ -275,7 +277,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
        @RequestMapping(value = "/portalApi/microservices/{widgetId}/style.css", method = RequestMethod.GET)
        public String getWidgetCSS(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
-               return template.getForObject(HTTPS
+               return template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://"
                                + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                + "/widget/microservices/" + widgetId + "/styles.css", String.class,
@@ -289,7 +291,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
 
                List<WidgetParameterResult> list = new ArrayList<>();
                Long serviceId = template.exchange(
-                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                               EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/parameters/" + widgetId,
                                HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), Long.class).getBody();
@@ -336,7 +338,7 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
 
                ServletContext context = request.getServletContext();
                byte[] byteFile = template.exchange(
-                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                               EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/download/" + widgetId,
                                HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), byte[].class).getBody();
@@ -388,5 +390,4 @@ public class WidgetsCatalogController extends EPRestrictedBaseController {
                }
                return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
        }
-
 }
index b0bc9fc..e8bd962 100644 (file)
@@ -26,6 +26,7 @@ import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;
 import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
 import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
 import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,9 +47,7 @@ import org.springframework.web.multipart.commons.CommonsMultipartResolver;
 public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController {
 
        private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogMarkupController.class);
-
        private RestTemplate template = new RestTemplate();
-
        private final String whatService = "widgets-service";
 
        @Autowired
@@ -77,7 +76,7 @@ public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController
                        @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
                return template
                                .getForObject(
-                                               "https://"
+                                               EcompPortalUtils.widgetMsProtocol() + "://"
                                                                + consulHealthService.getServiceLocation(whatService,
                                                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                                + "/widget/microservices/markup/" + widgetId,
index df835a9..6b9a441 100644 (file)
@@ -30,6 +30,7 @@ import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
 import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
 import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
 import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
 import org.openecomp.portalsdk.core.util.SystemProperties;
@@ -137,7 +138,7 @@ public class MicroserviceProxyServiceImpl implements MicroserviceProxyService {
 
                @SuppressWarnings({ "rawtypes", "unchecked" })
                ResponseEntity<Long> ans = (ResponseEntity<Long>) template.exchange(
-                               "https://"
+                               EcompPortalUtils.widgetMsProtocol() + "://"
                                                + consulHealthService.getServiceLocation(whatService,
                                                                SystemProperties.getProperty("microservices.widget.local.port"))
                                                + "/widget/microservices/widgetCatalog/parameters/" + widgetId,
index 8ef4593..23bb356 100644 (file)
@@ -61,5 +61,6 @@ public class EPCommonSystemProperties extends SystemProperties {
        
        public static final String AUTH_USER_SERVER                                     = "auth_user_server";
        public static final String EXTERNAL_ACCESS_ENABLE                               = "external_access_enable";
+       public static final String WIDGET_MS_PROTOCOL                                   = "microservices.widget.protocol";
 
 }
\ No newline at end of file
index 48c2dbe..2b39da0 100644 (file)
@@ -340,5 +340,19 @@ public class EcompPortalUtils {
                        }
                }
        }
+       
+       public static String widgetMsProtocol(){
+               final String protocol;
+               try{
+                       protocol = SystemProperties.getProperty(EPCommonSystemProperties.WIDGET_MS_PROTOCOL);
+                       return (protocol == null || protocol.trim().equals("")) ? "https" : protocol ;
+               }
+               catch(IllegalStateException ese){
+                       //looks like SystemProperties.getProperty throws IllegalStateException if it cannot find a property you are looking for
+                       //In order to not break the code if a non-required property is missing from system.properties, returning https as default
+                       //when this exception is caught.
+                       return "https";
+               }               
+       }
 
 }
index ee765c7..47f1cfb 100644 (file)
@@ -14,6 +14,9 @@ https://www.eclipse.org/m2e-wtp/
 
 ## Release Notes
 
+Version 1.1.?, July 2017
+- [Portal-30] Failed to communicate with the widget microservice: Fixed
+
 Version 1.1.0, July 2017
 - [Portal-7] Improvements added as part of the rebasing process
 - [Portal-6] Updates to License and Trademark in the PORTAL Source Code