Re: Array in document-style SOAP binding

From: Oliver Jaun <>
Date: Wed, 6 Oct 2004 07:20:59 -0700 (PDT)


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: