Hi, i have a service that upload a file. When i use a typically html form
everything works ok.
Now i try to test this using the client framework and the values of the
parameters are null.

Here is the interface:
public interface UploadServiceJaxRS {

    public void uploadProcessPOST(@MultipartForm FileUploadForm form);

the POJO:
public class FileUploadForm {

    private String name;

    private byte[] txtFile;

    public FileUploadForm() {}

    public byte[] getTxtFile() {
        return txtFile;

    public String getName() {
        return name;

    public void setTxtFile(final byte[] txtFile) {
        this.txtFile = txtFile;

    public void setName(String name) {
        this.name = name;

and the test:
    public void testPDFCreation() throws Exception{
        File file = new File("/tmp/test.txt");
        byte[] bytes = FileUtils.getBytes(file);
        FileUploadForm form = new FileUploadForm();

        UploadServiceJaxRS client =
ProxyFactory.create(UploadServiceJaxRS.class, "http://localhost:8080/e-forms
        try {
        } catch (Exception e) {
            // TODO Auto-generated catch block

Inside the implementation, the form parameter comes with their attributes
with null values

Any ideas?
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
Resteasy-users mailing list

Reply via email to