List « jersey « Java Enterprise Q&A





1. Pass List to RESTful webservice    stackoverflow.com

Is there a way to pass a list to RESTFul web service method in Jersey? Something like @PathParam("list") List list?

2. Sending a application/x-www-form-urlencoded list on html    stackoverflow.com

I need to send an HTTP Post request to a RESTful service written in Java and uses Jersey. My java function that handles request is like that:

@POST
@Consumes("application/x-www-form-urlencoded")
public Response update(@FormParam("items") List<String> items) {

 ...

3. Having problems getting a List of Objects back from Restful service    stackoverflow.com

Hey guys. I've developed some services in REST that are running on Glassfish 3.1. I have a Java SE application and I am using Jersey as the client api.

 public <T> ...

4. Jackson is not deserialising a generic list that it has serialised    stackoverflow.com

When using Apache Jersey with Jackson for JSON serialisation (on both server and client), I'm hitting a problem when deserialising a generic List. The JSON I am producing is as follows, all ...

5. Jackson + Jersey returns List with root name "List"    stackoverflow.com

Im currently trying to create a system for serializing POJO objects using Jackson and Jersey, here my resource:

@Path("/OrganicasFuncao")
public class OrganicasFuncaoResource {
public OrganicasFuncaoResource() {
    // TODO Auto-generated constructor stub
}

@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("/getAllOrganicasFuncao")

public ...

6. Unsupported Media Type (415)- PUTting a java List    stackoverflow.com

I'm getting Unsupported Media Type while HTTP putting a list. My code as follows:

Client

Client postClient = getClient();
WebResource postWebResource = postClient.resource(DEV_URI+"caches1");
Builder requestBuilder = postWebResource.type(MediaType.APPLICATION_JSON);  
requestBuilder.accept(MediaType.APPLICATION_JSON);
requestBuilder.header("accessor", "1011181517"); 
List<MyEntity> list = new ArrayList<MyEntity>();
MyEntity ...

7. How do I generate a list of what resources are available in HTML in Jersey?    stackoverflow.com

I would like for my web service to provide a handy reference to all available end points from each resource root that is requested with a html content type. It seems ...

8. Fetching REST resource as List with Jersey    stackoverflow.com

I'm trying to write a generic function in Jersey which can be used to fetch a List of objects of the same type through REST. I based it on the informations ...

9. jersey list of json objects    stackoverflow.com

I am trying to retrieve in my Jersey implementation resource class post collection of objects like this:

@POST
@Path("/send")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String sendEmails(ArrayList<AnyEmail> email) {
    //emailManager.sendEmail(email);
   ...





10. How to make Jersey/Jackson serialize empty list; single element list as an array    stackoverflow.com

Using Jersey and Jackson to create a REST interface, how do I get List fields to be serialized as a list when there are 0 or 1 elements in them. For ...