Hi

I'm trying to implement a REST WS to upload images with CXF 2.2.6 but I'm
getting a "*
Couldn't find MIME boundary" error and I don't know what's wrong.
*

This is what I have:

First the REST interface:

@Produces("text/xml")
public interface ImageService {

    @POST
    @Path("/{userId}")
    @Consumes("multipart/form-data")
    Response upload(@PathParam("userId") String userId, MultipartBody body);
}

Then I do a POST with this

<form action="http://localhost:8080/upload/1"; enctype="multipart/form-data"
method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile" size="40">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
*
*
*I get this error *
*
*
*
WARN org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper -
WebApplicationException has been caught : Couldn't find MIME boundary:
------WebKitFormBoundaryjoiEMONkidNgL2wU

Any ideas?

Thanks in advance,

Gabriel
*

Reply via email to