I'm using the RESTeasy package with JBOSS AS 6.0.0 final.

I'm trying to send a multipart form to a server with one part containing
json and the other part containing the file using the RESTeasy client.

The problem is that the receiving server wants Content-Disposition:
form-data; filename="somefilename.jpg" in the file part of the multipart
post. Now the client sends Content-Disposition: form-data; name="picture"

I have the multipart form constructed in the client as a POJO with the
needed annotations. The POJO used looks like this:

public class PictureExample {
private JsonData json;

private File data;

    public File getData() {
        return data;

    public void setData(File data) {
        this.data = data;

    public PictureExample() {

public JsonData getJson() {
return json;

public void setJson(JsonData json) {
this.json = json;

Is there any way to get the filename parameter into the Content-Disposition

All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
Resteasy-users mailing list

Reply via email to