Re: Array in document-style SOAP binding

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Wed, 06 Oct 2004 08:56:39 -0700

in your code below I dont see Content-Type header setting. Did you try adding Content-Type mime header? This may allow your DataContentHandler to be picked-up.

Something like: att.setMimeHeader("Content-Type", "application/octet-stream");


Oliver Jaun wrote:

>When I create an attachment with content-type
>application/octet-string and the
>Content-Transfer-Encoding is set to base64 (using
>setMimeHeader(...)) the attachment is automatically
>convertet to base64 which is great. However the base64
>encoded attachment has line breaks after 76 characters
>or so. I think this is because the Base64EncoderStream
>of the JavaMail-API is used. SMTP has a maximum
>"linewidth". The encoding is fine for emails but the
>problem is, that a newline is not part of the base64
>encoding and it seems that gSOAP (C Soap
>implementation) has problems decoding my
>"Java"-Soap-Message. I would like to have a the
>attachment encoded without newlines.
>How is the base64 encoding done in the background?
>How can I change it? I think it has something to do
>with the activation framework. I've implemented my own
>com.ascom.srv.file.OctetStreamDataContentHandler and
>added it to the mailcap. However the class is never
>loaded and the regular base64 encoding is used
>instead... I don't see why... Here's my code (the
>OctetStreamDataContentHandler has only some
>System.out.printlns so I can see if it is loaded...
>but it's not):
>MailcapCommandMap cm = (MailcapCommandMap)
>MessageContext mc =
>AttachmentPart att =
>FileInputStream fis = new
>InputStreamDataSource ids = new InputStreamDataSource(
>fis, "application/octet-stream", "distributedFile");
>DataHandler dh = new DataHandler(ids);
>Any ideas...hints? Thanks a lot in advance
>Oliver Jaun
>Do you Yahoo!?
>Declare Yourself - Register online to vote today!
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Vivek Pandey
Web Technologies and Standards
Sun Microsystems Inc.
To unsubscribe, e-mail:
For additional commands, e-mail: