fixing windows annotation issues

revert-dabc3590
Hasunie 8 years ago
parent c03a2fabc7
commit d82670fa94

@ -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

@ -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

@ -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(

@ -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);

@ -118,7 +118,7 @@
</jaxrs:server>
<!--Endpoint for UI admin operations-->
<jaxrs:server id="adminoperations" address="/operation">
<!--jaxrs:server id="adminoperations" address="/">
<jaxrs:serviceBeans>
<ref bean="deviceMgtAdminService"/>
<ref bean="swaggerResource"/>
@ -127,10 +127,10 @@
<ref bean="jsonProvider"/>
<ref bean="swaggerWriter"/>
</jaxrs:providers>
</jaxrs:server>
</jaxrs:server-->
<!-- Endpoint for Configurations -->
<jaxrs:server id="configurationService" address="/configuration">
<!--jaxrs:server id="configurationService" address="/">
<jaxrs:serviceBeans>
<ref bean="configurationMgtService"/>
<ref bean="swaggerResource"/>
@ -140,8 +140,27 @@
<ref bean="errorHandler"/>
<ref bean="swaggerWriter"/>
</jaxrs:providers>
</jaxrs:server-->
<jaxrs:server id="services" address="/">
<jaxrs:serviceBeans>
<ref bean="configurationMgtService"/>
<ref bean="deviceMgtAdminService"/>
<ref bean="swaggerResource"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider"/>
<ref bean="errorHandler"/>
<ref bean="swaggerWriter"/>
</jaxrs:providers>
<jaxrs:properties>
<!-- This is added to catch interceptor level exceptions in GlobalThrowableMapper. -->
<entry key="map.cxf.interceptor.fault" value="true" />
</jaxrs:properties>
</jaxrs:server>
<bean id="bstProviderService"
class="org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.impl.BSTProviderImpl"/>
<bean id="deviceMgtAdminService"

Loading…
Cancel
Save