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 a5f2075954..1796a637cb 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 @@ -66,8 +66,8 @@ import javax.ws.rs.core.Response; description = "This carries all the resources related to Windows configurations management functionalities") @WebService @Path("/configuration") -@Produces({"application/json", "application/xml"}) -@Consumes({"application/json", "application/xml"}) +@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public interface ConfigurationMgtService { @GET 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/DeviceManagementAdminService.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/DeviceManagementAdminService.java index da9d2678b7..0b1b0995c6 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/DeviceManagementAdminService.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/DeviceManagementAdminService.java @@ -58,9 +58,9 @@ import java.util.List; @Api(value = "Windows Device Management Administrative Service", description = "Device management related admin APIs.") @WebService -@Path("/admin/devices") -@Consumes(MediaType.APPLICATION_JSON) -@Produces(MediaType.APPLICATION_JSON) +@Path("/operation/admin/devices") +@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public interface DeviceManagementAdminService { @POST 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 c2a6607b39..f4829183e0 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 @@ -31,6 +31,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.Unexpecte import org.wso2.carbon.device.mgt.mobile.windows.api.common.exceptions.WindowsConfigurationException; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.services.ConfigurationMgtService; +import javax.ws.rs.core.MediaType; import javax.jws.WebService; import javax.ws.rs.*; @@ -39,9 +40,9 @@ import java.util.ArrayList; import java.util.List; @WebService -@Produces({"application/json", "application/xml"}) -@Consumes({"application/json", "application/xml"}) -@Path("/") +@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Path("/configuration") public class ConfigurationMgtServiceImpl implements ConfigurationMgtService { private static Log log = LogFactory.getLog( 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/DeviceManagementAdminServiceImpl.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/DeviceManagementAdminServiceImpl.java index 5f6e4e0826..0c9164da61 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/DeviceManagementAdminServiceImpl.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/DeviceManagementAdminServiceImpl.java @@ -35,9 +35,7 @@ import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.Message; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementAdminService; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.List; @@ -46,6 +44,9 @@ import java.util.List; * Implementation class of operations interface. Each method in this class receives the operations comes via UI * and persists those in the correct format. */ +@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) +@Path("/operation/admin/devices") public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminService { private static Log log = LogFactory.getLog(OperationImpl.class); diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/webapp/WEB-INF/cxf-servlet.xml index c61306808e..0b37aab36e 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -118,7 +118,7 @@ - + - + + + + + + + + + + + + + + + + + + +