From cfcc69b6fc02902b49b76ba6ae99ba268a964dd6 Mon Sep 17 00:00:00 2001 From: charithag Date: Mon, 12 Oct 2015 01:18:30 +0530 Subject: [PATCH] Fix issue with cnnecting remote APIM --- modules/samples/virtual_firealarm/build.xml | 5 ++++- .../service/impl/VirtualFireAlarmManagerService.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/samples/virtual_firealarm/build.xml b/modules/samples/virtual_firealarm/build.xml index 2ec49f63..04468cc0 100644 --- a/modules/samples/virtual_firealarm/build.xml +++ b/modules/samples/virtual_firealarm/build.xml @@ -23,7 +23,8 @@ jdbc/${data_source} - virtual_firealarm + + ]]> @@ -96,6 +97,8 @@ + + diff --git a/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmManagerService.java b/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmManagerService.java index c75937cc..48a1a1b5 100644 --- a/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmManagerService.java +++ b/modules/samples/virtual_firealarm/src/org.wso2.carbon.device.mgt.iot.sample.virtual.firealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/sample/virtual/firealarm/service/impl/VirtualFireAlarmManagerService.java @@ -292,7 +292,7 @@ public class VirtualFireAlarmManagerService { //create new device id String deviceId = shortUUID(); - TokenClient accessTokenClient = new TokenClient("firealarm"); + TokenClient accessTokenClient = new TokenClient(VirtualFireAlarmConstants.DEVICE_TYPE); AccessTokenInfo accessTokenInfo = null; accessTokenInfo = accessTokenClient.getAccessToken(owner, deviceId);