[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading multipart mime dataformat

I'm wanting to send a small set of files to a HTTP server as a POST request and have Camel handle the request.

Seems like one way of doing this is to use curl on the sending end to create the POST request and have the Camel MIME-Multipart data format [1] handle the request on the receiving end. So I set up a simple test. My camel route contains this:

            .log("POSTed data\n${body}")

On the sending end I post some simple test data like this:

    curl -X POST -F name=superman -F power=flying "http://localhost:8080/path/to/multi/";

This generates a body that looks like this:

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

Content-Disposition: form-data; name="power"


But Camel fails to handle this with this error:

javax.mail.internet.ParseException: Missing start boundary
        at javax.mail.internet.MimeMultipart.parse(
        at javax.mail.internet.MimeMultipart.getBodyPart(         at org.apache.camel.dataformat.mime.multipart.MimeMultipartDataFormat.unmarshal(         at org.apache.camel.processor.UnmarshalProcessor.process(

Any hints on how to get this working? The documentation page doesn't contain much info for reading multipart requests, only writing them :-(


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03361.html on line 128
Call Stack
10.0007368536{main}( ).../msg03361.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03361.html on line 128
Call Stack
10.0007368536{main}( ).../msg03361.html:0