diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java index c12736879..116e2e981 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationReply.java @@ -69,6 +69,7 @@ public class OperationReply { this.syncmlDocument = syncmlDocument; replySyncmlDocument = new SyncmlDocument(); } + public OperationReply() { } @@ -228,8 +229,8 @@ public class OperationReply { } private void appendOperations(SyncmlBody syncmlBody) throws PolicyManagementException, - FeatureManagementException, JSONException, - SyncmlOperationException { + FeatureManagementException, JSONException, SyncmlOperationException { + GetTag getElement = new GetTag(); List getElements = new ArrayList<>(); List executeElements = new ArrayList<>(); @@ -238,6 +239,7 @@ public class OperationReply { ReplaceTag replaceElement = new ReplaceTag(); List replaceItems = new ArrayList<>(); SequenceTag monitorSequence = new SequenceTag(); + List deviceInfoOperations; if (operations != null) { for (Operation operation : operations) { @@ -317,6 +319,14 @@ public class OperationReply { } } } + if (PluginConstants.OperationCodes.DEVICE_INFO.equals(operation.getCode())) { + HeartBeatDeviceInfo heartBeatDeviceInfo = new HeartBeatDeviceInfo(); + deviceInfoOperations = heartBeatDeviceInfo.getDeviceInfo(); + for (int x = 0; x > deviceInfoOperations.size(); x++) { + ItemTag deviceInfo = appendGetInfo(operation); + getElements.add(deviceInfo); + } + } break; } } @@ -370,7 +380,7 @@ public class OperationReply { } } if ((operationCode != null) && - PluginConstants.OperationCodes.LOCK_RESET.equals(operationCode)) { + PluginConstants.OperationCodes.LOCK_RESET.equals(operationCode)) { operation.setCode(PluginConstants.OperationCodes.PIN_CODE); for (Info getInfo : Info.values()) { if (operation.getCode().equals(getInfo.name())) { @@ -543,8 +553,8 @@ public class OperationReply { } public SequenceTag buildSequence(Operation operation, SequenceTag sequenceElement) throws - JSONException, - SyncmlOperationException { + JSONException, + SyncmlOperationException { sequenceElement.setCommandId(operation.getId()); List replaceItems = new ArrayList<>();