New to the list and relatively new to java and axis.

 I am trying to use axis 1.3 to send attachments to .NET in DIME
format as I have read that it doesn't support MIME.

I have sent an attachment successfully, however I am sending a PDF and
the .NET side isn't recognizing it's file type.

Is it possible to send file type info for DIME attachments?  When I
try I get errors and the .NET side says the file is zero length.

Here is some of the code I am using which is based out of WSDL2Java:

// this was required to let mail know about the pdf type
                javax.activation.MailcapCommandMap mc =
(javax.activation.MailcapCommandMap)javax.activation.CommandMap.getDefaultCommandMap();
                mc.addMailcap("application/pdf;;
x-java-content-handler=com.sun.mail.handlers.text_html");
                javax.activation.CommandMap.setDefaultCommandMap(mc);


                javax.activation.DataHandler pdfFile = new
javax.activation.DataHandler(new
javax.activation.FileDataSource("/Users/admin/Desktop/testads.pdf"),"application/pdf");
binding.addAttachment(pdfFile);

if I take out the content type, then it sends, but .NET doesn't know
what the file is. If I leave it in, then .NET gets a zero length file.

Thanks for any help,

Kyle

Reply via email to