Hi

Can anyone please let me know if I have done something wrong here..

*I have exposed the following simple service method ( using cxf 2.3.3 ) *

    @Override
    @POST
    @Consumes(MediaType.MULTIPART_FORM_DATA)
    public Response saveForm() {
        System.out.println(AttachmentUtils.getAttachments(mc).size());
        return Response.status(Response.Status.OK).build();
    }

*The following is a request ( captured through tcpmon ) to the above defined
service method:* ( it is a form post )

POST /api/v1/rest HTTP/1.1
Host: localhost:8081
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://localhost/form.html
Content-Type: multipart/form-data;
boundary=---------------------------91021093918280655661679102041
Content-Length: 345

-----------------------------91021093918280655661679102041
Content-Disposition: form-data; name="title"

test
-----------------------------91021093918280655661679102041
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain

file content

-----------------------------91021093918280655661679102041--


*The following is the response received for above request:*

<ns1:XMLFault>
<ns1:faultstring>
java.io.IOException: Couldn't find MIME boundary:
-----------------------------91021093918280655661679102041
</ns1:faultstring>
</ns1:XMLFault>

Thanks in advance !


Regards,
Shashank Rachamalla

Reply via email to