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/OperationHandler.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/OperationHandler.java index 6c7c48f7f8..0cc07df23b 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/OperationHandler.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/OperationHandler.java @@ -231,7 +231,7 @@ public class OperationHandler { } } - public void updateDisenrollOperation(DeviceIdentifier deviceIdentifier) throws OperationManagementException { + public void updateDisenrollOperationStatus(DeviceIdentifier deviceIdentifier) throws OperationManagementException { List pendingDeviceInfoOperations; try { pendingDeviceInfoOperations = WindowsAPIUtils.getPendingOperations(deviceIdentifier); 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/services/enrollment/impl/EnrollmentServiceImpl.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/services/enrollment/impl/EnrollmentServiceImpl.java index 814a7d0ef0..c8205c7e14 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/services/enrollment/impl/EnrollmentServiceImpl.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/services/enrollment/impl/EnrollmentServiceImpl.java @@ -390,12 +390,10 @@ public class EnrollmentServiceImpl implements EnrollmentService { deviceInfoProperties.setValue(windowsDevice.getWindowsType()); String deviceInfo = gson.toJson(deviceInfoProperties); - Device.Property winDeviceType = new Device.Property(); winDeviceType.setName(PluginConstants.SyncML.DEVICE_INFO); winDeviceType.setValue(deviceInfo); - List propertyList = new ArrayList<>(); propertyList.add(OSVersionProperty); propertyList.add(IMSEIProperty); @@ -407,7 +405,6 @@ public class EnrollmentServiceImpl implements EnrollmentService { enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD); enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE); - generatedDevice.setEnrolmentInfo(enrolmentInfo); generatedDevice.setDeviceIdentifier(windowsDevice.getDeviceId()); generatedDevice.setProperties(propertyList); 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/services/impl/DeviceManagementServiceImpl.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/services/impl/DeviceManagementServiceImpl.java index cfccd5e13d..1525566b42 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/services/impl/DeviceManagementServiceImpl.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/services/impl/DeviceManagementServiceImpl.java @@ -140,7 +140,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { syncmlDocument, pendingOperations)).build(); } else { if (WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier, false) != null) { - operationHandler.updateDisenrollOperation(deviceIdentifier); + operationHandler.updateDisenrollOperationStatus(deviceIdentifier); WindowsAPIUtils.getDeviceManagementService().disenrollDevice(deviceIdentifier); return Response.ok().entity(operationReply.generateReply(syncmlDocument, null)).build(); } else {