Good day all,
I am having problems adding Rest Services to mdm-admin
I had some troubles with mdm-android-* I created the service and reference in the permission.xml file
Creating a rest service in mdm-admin it has sefinitin as below
@GET
@Path("{type}/{id}/logs")
public List<? extends Application> getDeviceLogs(
@PathParam("type") String type,
@PathParam("id") String id)
throws MDMAPIException {
List<Application> applications;
ApplicationManagementProviderService appManagerConnector;
DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
try {
deviceIdentifier.setType(type);
deviceIdentifier.setId(id);
appManagerConnector = MDMAPIUtils.getAppManagementService();
applications = appManagerConnector.getApplicationListForDevice(deviceIdentifier);
} catch (ApplicationManagementException e) {
String msg = "Error occurred while fetching the apps of the device.";
log.error(msg, e);
throw new MDMAPIException(msg, e);
}
return applications;
}
}
It is a clone of the get list of application method with just the path and function name changed.
When I deploy it. my webapp returns a 404 error status Code. when I try to call the function
To replicate this, Download v2.0.1 Open with Netbeans, Modify WSO2 MDM - Mobile Device Management Admin Services
Copy and paste one of the rest functions, rename the function Deploy and call that new function
How can I resolve this?