|
|
@ -89,7 +89,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
|
|
|
|
|
|
|
|
if (modifyEnrollWithMoreDetail(request)) {
|
|
|
|
if (modifyEnrollWithMoreDetail(request)) {
|
|
|
|
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
|
|
|
|
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
|
|
|
|
response = operationReply.generateReply(syncmlDocument,pendingOperations);
|
|
|
|
response = operationReply.generateReply(syncmlDocument, pendingOperations);
|
|
|
|
return Response.status(Response.Status.OK).entity(response).build();
|
|
|
|
return Response.status(Response.Status.OK).entity(response).build();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
String msg = "Error occurred in while modify the enrollment.";
|
|
|
|
String msg = "Error occurred in while modify the enrollment.";
|
|
|
@ -101,7 +101,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
log.error(msg);
|
|
|
|
log.error(msg);
|
|
|
|
return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
|
|
|
|
return Response.status(Response.Status.UNAUTHORIZED).entity(msg).build();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ((syncmlDocument.getBody().getAlert() != null)) {
|
|
|
|
if ((syncmlDocument.getBody().getAlert() != null)) {
|
|
|
|
if (!syncmlDocument.getBody().getAlert().getData().equals(Constants.DISENROLL_ALERT_DATA)) {
|
|
|
|
if (!syncmlDocument.getBody().getAlert().getData().equals(Constants.DISENROLL_ALERT_DATA)) {
|
|
|
|
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
|
|
|
|
pendingOperations = operationHandler.getPendingOperations(syncmlDocument);
|
|
|
@ -155,8 +155,8 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
private boolean modifyEnrollWithMoreDetail(Document request) throws WindowsDeviceEnrolmentException,
|
|
|
|
private boolean modifyEnrollWithMoreDetail(Document request) throws WindowsDeviceEnrolmentException,
|
|
|
|
WindowsOperationException {
|
|
|
|
WindowsOperationException {
|
|
|
|
|
|
|
|
|
|
|
|
String devMan;
|
|
|
|
String devMan = null;
|
|
|
|
String devMod;
|
|
|
|
String devMod = null;
|
|
|
|
boolean status = false;
|
|
|
|
boolean status = false;
|
|
|
|
String user;
|
|
|
|
String user;
|
|
|
|
SyncmlDocument syncmlDocument;
|
|
|
|
SyncmlDocument syncmlDocument;
|
|
|
@ -165,8 +165,15 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
syncmlDocument = SyncmlParser.parseSyncmlPayload(request);
|
|
|
|
syncmlDocument = SyncmlParser.parseSyncmlPayload(request);
|
|
|
|
ReplaceTag replace = syncmlDocument.getBody().getReplace();
|
|
|
|
ReplaceTag replace = syncmlDocument.getBody().getReplace();
|
|
|
|
List<ItemTag> itemList = replace.getItems();
|
|
|
|
List<ItemTag> itemList = replace.getItems();
|
|
|
|
devMan = itemList.get(PluginConstants.SyncML.DEVICE_MAN_POSITION).getData();
|
|
|
|
for (ItemTag itemTag : itemList) {
|
|
|
|
devMod = itemList.get(PluginConstants.SyncML.DEVICE_MODEL_POSITION).getData();
|
|
|
|
String locURI = itemTag.getSource().getLocURI();
|
|
|
|
|
|
|
|
if (OperationCode.Info.MANUFACTURER.getCode().equals(locURI)) {
|
|
|
|
|
|
|
|
devMan = itemTag.getData();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (OperationCode.Info.DEVICE_MODEL.getCode().equals(locURI)) {
|
|
|
|
|
|
|
|
devMod = itemTag.getData();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
user = syncmlDocument.getHeader().getSource().getLocName();
|
|
|
|
user = syncmlDocument.getHeader().getSource().getLocName();
|
|
|
|
AuthenticationInfo authenticationInfo = new AuthenticationInfo();
|
|
|
|
AuthenticationInfo authenticationInfo = new AuthenticationInfo();
|
|
|
|
authenticationInfo.setUsername(user);
|
|
|
|
authenticationInfo.setUsername(user);
|
|
|
|