[jboss-user] [JBoss Web Services] New message: "Re: [JBossWS] MTOM client parsing exception"

Karl Determe do-not-reply at jboss.com
Fri Mar 12 05:32:50 EST 2010

User development,

A new message was posted in the thread "[JBossWS] MTOM client parsing exception":


Author  : Karl Determe
Profile : http://community.jboss.org/people/determek

I got some more information when debugging. On the server side I do generate a Pdf file that has a correct syntax. But when I try to return it as a DataHandler [5] I got the Exception:
com.sun.xml.internal.org.jvnet.mimepull.MIMEParsingException: java.io.IOException: LF should be proceeded by CR
but instead  when I send an image [1], a zipped image [2]on client side everything is Ok. 
Moreover when I do zip this pdf file (as sender.zip) and I try to return it as a DataHandler [3] I got the same Exception !
Anybody got an idea ?
Help would be very appreciated...
*Server side*
[1] File img = new File("C:\\TEMP\\image.jpg");
[2] File img = new File("C:\\TEMP\\image.zip");
[3] File img = *new* File("C:\\TEMP\\sender.pdf");
[4] File img = *new* File("C:\\TEMP\\sender.zip");
*return* *new* DataHandler(*new* FileDataSource(img));
ByteArrayDataSource bads = new ByteArrayDataSource(baosPDF.toByteArray(), MIMEtype);
return new DataHandler(bads);
(MIMEtype is "application/octet-stream")
*Client side*
DataHandler handler = +map2Pdf+.getMap2Pdf(…..);
InputStream is = handler.getDataSource().getInputStream();
+writeToFile+(is, *new* File("C:\\TEMP\\client.bin"));


To reply to this message visit the message page: http://community.jboss.org/message/531576#531576

More information about the jboss-user mailing list