From fb28a4042ffc16f8e4279c715433d1e282a9270b Mon Sep 17 00:00:00 2001 From: Hasunie Date: Wed, 1 Feb 2017 12:02:50 +0530 Subject: [PATCH] fixing windows config issues --- .../api/services/ConfigurationMgtService.java | 4 ++-- .../api/services/discovery/DiscoveryService.java | 1 - .../services/impl/ConfigurationMgtServiceImpl.java | 3 +-- .../windows/api/services/syncml/SyncmlService.java | 13 ------------- 4 files changed, 3 insertions(+), 18 deletions(-) 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/ConfigurationMgtService.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/ConfigurationMgtService.java index cbc7132d6..236d8d8a5 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/ConfigurationMgtService.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/ConfigurationMgtService.java @@ -209,9 +209,9 @@ public interface ConfigurationMgtService { @GET @Path("license") - @Produces(MediaType.TEXT_PLAIN) + @Produces(MediaType.APPLICATION_JSON) @ApiOperation( - produces = MediaType.TEXT_PLAIN, + produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Getting the License Agreement to Register a Windows Device", notes = "Use this REST API to retrieve the license agreement that is used for the Windows device " + 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/discovery/DiscoveryService.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/discovery/DiscoveryService.java index d271d9892..4a3f0b12b 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/discovery/DiscoveryService.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/discovery/DiscoveryService.java @@ -41,7 +41,6 @@ import javax.xml.ws.soap.SOAPBinding; @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) public interface DiscoveryService { @POST - @RequestWrapper(localName = "Discover", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE) @WebMethod(operationName = "Discover") @ResponseWrapper(localName = "DiscoverResponse", targetNamespace = PluginConstants.DISCOVERY_SERVICE_TARGET_NAMESPACE) 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/ConfigurationMgtServiceImpl.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/ConfigurationMgtServiceImpl.java index f4829183e..2230dc362 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/ConfigurationMgtServiceImpl.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/ConfigurationMgtServiceImpl.java @@ -98,10 +98,9 @@ public class ConfigurationMgtServiceImpl implements ConfigurationMgtService { * @throws WindowsConfigurationException */ @PUT - public Response updateConfiguration(PlatformConfiguration windowsPlatformConfiguration) throws WindowsConfigurationException { + public Response updateConfiguration(PlatformConfiguration configuration) throws WindowsConfigurationException { String message; ConfigurationEntry licenseEntry = null; - PlatformConfiguration configuration = new PlatformConfiguration(); try { configuration.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_WINDOWS); List configs = configuration.getConfiguration(); 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/syncml/SyncmlService.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/syncml/SyncmlService.java index b666e3f22..9b1928319 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/syncml/SyncmlService.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/syncml/SyncmlService.java @@ -17,10 +17,7 @@ */ package org.wso2.carbon.device.mgt.mobile.windows.api.services.syncml; - import org.w3c.dom.Document; -import org.wso2.carbon.apimgt.annotations.api.Scope; -import org.wso2.carbon.apimgt.annotations.api.Scopes; import org.wso2.carbon.device.mgt.common.notification.mgt.NotificationManagementException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.PluginConstants; import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException; @@ -39,16 +36,6 @@ import javax.ws.rs.core.Response; */ @Path("/devicemanagement") -@Scopes( - scopes = { - @Scope( - name = "Pending operations", - description = "Register an Windows device", - key = "perm:windows:enroll", - permissions = {"/device-mgt/devices/enroll/windows"} - ) - } -) public interface SyncmlService { @Path("/request")