I want to make a Post to Jersey Rest service. What is the standard way of doing this?
@Post @Consumes(MediaType.Application_xml) public Response method(??){}
I want to make a Post to Jersey Rest service. What is the standard way of doing this?
@Post @Consumes(MediaType.Application_xml) public Response method(??){}
Below is an example of a post operation:
@POST
@Consumes({"application/xml", "application/json"})
public Response create(@Context UriInfo uriInfo, Customer entity) {
    entityManager.persist(entity);
    entityManager.flush();
    UriBuilder uriBuilder = uriBuiler.path(String.valueOf(entity.getId()));
    return Response.created(uriBuilder.build()).build();
}