Vadim, The content type of the attachment is determined by a call to DataSource#getContentType(). The problem is that FileDataSource doesn't allow you to set the content type explicitly, but uses some filetype mapping mechanism. There is an alternative implementation called "CachedFileDataSource" in Axiom that allows you to set the content type yourself.
Regards, Andreas On Thu, Jul 23, 2009 at 23:08, Vadim Letitchevski<vletitchev...@teledyne.com> wrote: > I have used "Sample client which sends a message with SwA type attachments" > code snippet to adjust my Stab generated from WSDL. > Particularly these strings: > > FileDataSource fileDataSource = new FileDataSource("Name.tar.gz"); > DataHandler dataHandler = new DataHandler(fileDataSource); > _messageContext.addAttachment(myclass.getPartData().getHref(), > dataHandler); > There are some things I wish were a bit more manageable. > Can anyone tell me how to set the attachment Content Type. When I attach > file "Name.tar.gz" the automatic selection sets it to > "application/octet-stream" where I would like to see "application/tar.gz". > > > Thanks > Vadim. > (310)765-3812 > >