octet-stream as attachment
843834Sep 29 2004 — edited Sep 30 2004Hi
I successfully transmitted a string via jaxrpc (using text/plain as mime type). No I would like to transmit a binary file. I think in this case the application/octed-stream mime type should be used. However when I try this I get a
"no object DCH for MIME type application/octet-stream"
error message in my server.log. The source looks like this:
AttachmentPart att = MessageFactory.newInstance().createMessage().createAttachmentPart();
att.setContentId("distributedFile");
javax.activation.FileDataSource fds = new javax.activation.FileDataSource("/usr/bin/grep");
att.setContent(fds, "application/octet-stream");
I also tried to use a ByteArrayInputStream(bytes) but I always get the same message. Well, it might be, that I have to write an own DataHandler for OctetStream but this seems to be a bit strange because it's not really exotic...
any ideas? Thanks a lot in advance. Regards
Oliver