1

I am Generating Rest services using CXF Aegis data binding here, I don't want to use @XMLRootElement annotations. for that, I am using @Path, @PathParam annotations but here for the Response object What should use I don't have clarity please help to resolve this.

Here is the code for rest service configuration. Here don't know how to configure that List

   @POST
   @Path("/getworkorders/")
   @Consumes("application/json")
   @Produces("application/json")
   public List<WorkOrderNeutral>getWorkOrders(@PathParam("BaseFilterNeutral")BaseFilterNeutral baseFilterNeutral) throws ServiceException;

here is my data binding provider

<bean id="jaxbProviderAegis-workOrder" class="org.apache.cxf.jaxrs.provider.aegis.AegisElementProvider"/> 
usm426
  • 15
  • 5
  • You shouldn't need to use `@XmlRootElement` if you are using Jackson as your JSON provider. – Paul Samsotha Sep 14 '19 at 05:01
  • Thanks for the reply, I am getting Object like **[{"userName":"sathish","userId":7},{"userName":"mani","userId":101}]** But i need **{ objectName : [{"userName":"sathish","userId":7},{"userName":"mani","userId":101}]** – usm426 Sep 15 '19 at 17:07

0 Answers0