From 38457554a5c4e61e84fefe337e253510815b5137 Mon Sep 17 00:00:00 2001 From: Shabirmean Date: Wed, 14 Oct 2015 23:50:50 +0530 Subject: [PATCH] changes to take in both https and http server endpoints --- .../virtual_firealarm/sketch/deviceConfig.properties | 5 +++-- .../firealarm/service/impl/VirtualFireAlarmService.java | 9 --------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/samples/virtual_firealarm/sketch/deviceConfig.properties b/modules/samples/virtual_firealarm/sketch/deviceConfig.properties index 4af8602c..6dd5a684 100644 --- a/modules/samples/virtual_firealarm/sketch/deviceConfig.properties +++ b/modules/samples/virtual_firealarm/sketch/deviceConfig.properties @@ -18,8 +18,9 @@ #[Device-Configurations] owner=${DEVICE_OWNER} deviceId=${DEVICE_ID} -server-ep=${SERVER_EP} -service-ep=${SERVICE_EP} +controller-context=/virtual_firealarm/controller +https-ep=${HTTPS_EP} +http-ep=${HTTP_EP} apim-ep=${APIM_EP} mqtt-ep=${MQTT_EP} xmpp-ep=${XMPP_EP} 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/VirtualFireAlarmService.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/VirtualFireAlarmService.java index d75a3236..1baf75d7 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/VirtualFireAlarmService.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/VirtualFireAlarmService.java @@ -368,15 +368,6 @@ public class VirtualFireAlarmService { newXmppAccount.setAccountName(owner + "_" + deviceId); newXmppAccount.setUsername(deviceId); newXmppAccount.setPassword(accessToken); - - String xmppEndPoint = XmppConfig.getInstance().getXmppControlQueue().getServerURL(); - - int indexOfChar = xmppEndPoint.lastIndexOf('/'); - - if (indexOfChar != -1) { - xmppEndPoint = xmppEndPoint.substring((indexOfChar + 1), xmppEndPoint.length()); - } - newXmppAccount.setEmail(deviceId + "@wso2.com"); XmppServerClient xmppServerClient = new XmppServerClient();