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") description = "This carries all the resources related to Windows configurations management functionalities")
@WebService @WebService
@Path("/configuration") @Path("/configuration")
@Produces({"application/json", "application/xml"}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes({"application/json", "application/xml"}) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public interface ConfigurationMgtService { public interface ConfigurationMgtService {
@GET @GET

@ -58,9 +58,9 @@ import java.util.List;
@Api(value = "Windows Device Management Administrative Service", @Api(value = "Windows Device Management Administrative Service",
description = "Device management related admin APIs.") description = "Device management related admin APIs.")
@WebService @WebService
@Path("/admin/devices") @Path("/operation/admin/devices")
@Consumes(MediaType.APPLICATION_JSON) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Produces(MediaType.APPLICATION_JSON) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public interface DeviceManagementAdminService { public interface DeviceManagementAdminService {
@POST @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.exceptions.WindowsConfigurationException;
import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils; import org.wso2.carbon.device.mgt.mobile.windows.api.common.util.WindowsAPIUtils;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.ConfigurationMgtService; import org.wso2.carbon.device.mgt.mobile.windows.api.services.ConfigurationMgtService;
import javax.ws.rs.core.MediaType;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.*; import javax.ws.rs.*;
@ -39,9 +40,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@WebService @WebService
@Produces({"application/json", "application/xml"}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes({"application/json", "application/xml"}) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Path("/") @Path("/configuration")
public class ConfigurationMgtServiceImpl implements ConfigurationMgtService { public class ConfigurationMgtServiceImpl implements ConfigurationMgtService {
private static Log log = LogFactory.getLog( 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.common.util.WindowsAPIUtils;
import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementAdminService; import org.wso2.carbon.device.mgt.mobile.windows.api.services.DeviceManagementAdminService;
import javax.ws.rs.HeaderParam; import javax.ws.rs.*;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import java.util.List; 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 * Implementation class of operations interface. Each method in this class receives the operations comes via UI
* and persists those in the correct format. * 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 { public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminService {
private static Log log = LogFactory.getLog(OperationImpl.class); private static Log log = LogFactory.getLog(OperationImpl.class);

@ -118,7 +118,7 @@
</jaxrs:server> </jaxrs:server>
<!--Endpoint for UI admin operations--> <!--Endpoint for UI admin operations-->
<jaxrs:server id="adminoperations" address="/operation"> <!--jaxrs:server id="adminoperations" address="/">
<jaxrs:serviceBeans> <jaxrs:serviceBeans>
<ref bean="deviceMgtAdminService"/> <ref bean="deviceMgtAdminService"/>
<ref bean="swaggerResource"/> <ref bean="swaggerResource"/>
@ -127,12 +127,26 @@
<ref bean="jsonProvider"/> <ref bean="jsonProvider"/>
<ref bean="swaggerWriter"/> <ref bean="swaggerWriter"/>
</jaxrs:providers> </jaxrs:providers>
</jaxrs:server> </jaxrs:server-->
<!-- Endpoint for Configurations --> <!-- Endpoint for Configurations -->
<jaxrs:server id="configurationService" address="/configuration"> <!--jaxrs:server id="configurationService" address="/">
<jaxrs:serviceBeans>
<ref bean="configurationMgtService"/>
<ref bean="swaggerResource"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider"/>
<ref bean="errorHandler"/>
<ref bean="swaggerWriter"/>
</jaxrs:providers>
</jaxrs:server-->
<jaxrs:server id="services" address="/">
<jaxrs:serviceBeans> <jaxrs:serviceBeans>
<ref bean="configurationMgtService"/> <ref bean="configurationMgtService"/>
<ref bean="deviceMgtAdminService"/>
<ref bean="swaggerResource"/> <ref bean="swaggerResource"/>
</jaxrs:serviceBeans> </jaxrs:serviceBeans>
<jaxrs:providers> <jaxrs:providers>
@ -140,8 +154,13 @@
<ref bean="errorHandler"/> <ref bean="errorHandler"/>
<ref bean="swaggerWriter"/> <ref bean="swaggerWriter"/>
</jaxrs:providers> </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> </jaxrs:server>
<bean id="bstProviderService" <bean id="bstProviderService"
class="org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.impl.BSTProviderImpl"/> class="org.wso2.carbon.device.mgt.mobile.windows.api.services.authbst.impl.BSTProviderImpl"/>
<bean id="deviceMgtAdminService" <bean id="deviceMgtAdminService"

Loading…
Cancel
Save