From 8f9b7164cc42da4522e2e397ec34676a8f890ab2 Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Thu, 17 Oct 2019 15:28:19 +0530 Subject: [PATCH] Fix 415 error in delete endpoints of Android Enterprise API --- .../services/android/services/AndroidEnterpriseService.java | 3 +++ .../android/services/impl/AndroidEnterpriseServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/AndroidEnterpriseService.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/AndroidEnterpriseService.java index 867ae9611..a76a57ada 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/AndroidEnterpriseService.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/AndroidEnterpriseService.java @@ -487,6 +487,7 @@ public interface AndroidEnterpriseService { @DELETE @Path("/store-layout/page/{id}") + @Consumes(MediaType.WILDCARD) @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "DELETE", @@ -847,6 +848,7 @@ public interface AndroidEnterpriseService { @DELETE @Path("/store-layout/cluster/{clusterId}/page/{pageId}") + @Consumes(MediaType.WILDCARD) @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "DELETE", @@ -1215,6 +1217,7 @@ public interface AndroidEnterpriseService { @DELETE @Path("/managed-configs/mcm/{mcmId}") + @Consumes(MediaType.WILDCARD) @ApiOperation( produces = MediaType.APPLICATION_JSON, httpMethod = "DELETE", diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/AndroidEnterpriseServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/AndroidEnterpriseServiceImpl.java index fab542626..fd735c35c 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/AndroidEnterpriseServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/AndroidEnterpriseServiceImpl.java @@ -329,6 +329,7 @@ public class AndroidEnterpriseServiceImpl implements AndroidEnterpriseService { @DELETE @Path("/store-layout/page/{id}") + @Consumes(MediaType.WILDCARD) @Override public Response deletePage(@PathParam("id") String id) { if (id == null || id.isEmpty()) { @@ -492,6 +493,7 @@ public class AndroidEnterpriseServiceImpl implements AndroidEnterpriseService { @DELETE @Path("/store-layout/cluster/{clusterId}/page/{pageId}") + @Consumes(MediaType.WILDCARD) @Override public Response deleteCluster( @PathParam("clusterId") String clusterId, @PathParam("pageId") String pageId) { if (clusterId == null || clusterId.isEmpty()) { @@ -683,6 +685,7 @@ public class AndroidEnterpriseServiceImpl implements AndroidEnterpriseService { @Override @DELETE @Path("/managed-configs/mcm/{mcmId}") + @Consumes(MediaType.WILDCARD) public Response deleteManagedConfigs(@PathParam("mcmId") String mcmId) { if (mcmId == null || mcmId.isEmpty()) { return Response.status(Response.Status.BAD_REQUEST).entity(