Linked Questions
22 questions linked to/from JAX-RS Post multiple objects
1
vote
1
answer
432
views
Unmarshalling different objects in same Jersey service [duplicate]
I'm trying to find a way to create a service that will receive different object types as JSON and unmarshall them correctly. Until now I was able to achieve single or list object unmarshalling using a ...
1
vote
0
answers
82
views
Mapping JSON properties to method parameters with Jackson (JAX-RS) [duplicate]
I'm using Jackson 2 on a JAX-RS project, and I have a method that expects a JSON with this structure:
{
"actor": { "name": "Joe" },
"movie": { "title": "The Movie" }
}
I was able to map this ...
0
votes
0
answers
64
views
How to pass multiple argument in the REST api [duplicate]
This is my REST api for different operation.
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs....
631
votes
14
answers
1.1m
views
Sending multipart/formdata with jQuery.ajax
I've got a problem sending a file to a serverside PHP-script using jQuery's ajax function.
It's possible to get the File-List with $('#fileinput').attr('files') but how is it possible to send this ...
76
votes
6
answers
123k
views
File upload along with other object in Jersey restful web service
I want to create an employee information in the system by uploading an image along with employee data. I am able to do it with different rest calls using jersey. But I want to achieve in one rest call....
20
votes
3
answers
76k
views
How to send multipart/form-data form content by ajax (no jquery)?
I am trying to send some form without reloading the page and I am trying to understand the under-the-hood details therefore not using any JavaScript library:
var http = createRequestObject();
...
6
votes
1
answer
22k
views
Java Rest Jersey : Posting multiple types of data (File and JSON)
I have a Jersey REST service to which data will be posted. There will be a a CSV file which is the actual data and some meta-data for that CSV (the meta can either be in JSON or XML format). How ...
4
votes
1
answer
6k
views
RESTeasy client code for attaching a file
I need to attach a file to my service end-point .
I tested the functionality via POSTMAN ( chrome browser plugin to test rest service ) , it is working fine.
But I need to test the same with JUNIT .
...
4
votes
4
answers
3k
views
Pass parameters in the client
I use a RESTful Web Service. In this web service I must pass a bean that I want to save as a parameter.
Here is the server code:
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType....
2
votes
1
answer
2k
views
jersey 2 multipart pojo is always null
I'm trying to write a rest service to upload a file along with some other file information, using Jersey + Jackson.
Using multipart, the file is uploaded correctly, and simple fields are OK as well, ...
2
votes
1
answer
4k
views
webservice with a file inputstream and a json body?
I would like to implement a webservice with cxf to upload a file with some informations about it contained in the body.
What I've done but didn't work yet :
@POST
@Path("/")
@Consumes(MediaType....
3
votes
1
answer
3k
views
JAX-RS polymorphic POST request: how should I write my JSON?
I'm having a bad time trying to solve this problem with JAX-RS and I believe that it has something to do with the marshalling/unmarshalling process (that I don't know very much about, I assume), and I ...
3
votes
1
answer
5k
views
How to submit multiple entities to the post method from jersey client program?
I am trying to pass multiple entities to the web service method. The web service method has two parameters of pojo entity type. I am able to post only one entity to the web service method. I am unable ...
0
votes
1
answer
8k
views
How to receive JSON Messages in POST body in a JAX-RS Restful web service in CXF?
I'm trying to develop a REST service using Apache-CXF, on top of JAX-RS. For starters, I have a method called test that receives a String message and int value. I want the clients to be able to pass ...
2
votes
1
answer
4k
views
Trouble in posting data as form data in Angular JS to Java REST web-service
I am trying to create a web service in Java that accepts two lists as FormData parameter.
I have used the Angualr JS http service as mentioned in this answer.
var queryRequest = $http({
method:'...