Re: Multipart content

"M. (Neo-Ranga) Ranganathan" <[email protected]> Mon, 21 May 2007 13:18:34 -0400
Newsgroups gmane.comp.voip.nist-sip,gmane.comp.java.jna.user
Message-ID <[email protected]>
Hello!

The issue youare having has to do with the mail API rather than SIP
API. Therefore, I dont know how to help. In any case, in JAIN-SIP
there is no explict support for mutlipart mime. You can set
contentType to multipart mime and append whatever content you like to
the message ( binary content is fine ).

Ranga

You have to

On 5/21/07, Daniel Martínez <[email protected]> wrote:
> Hi, I'm sending this doubt on behalf of a workmate. I hope someone can throw some light.
> Thanks, regards.
> Daniel M.
>
>
> Hello
> I have problems related with Multipart message... I have spent several
> days looking for the way to insert a mime multipart body in a publish
> request, this mime multipart have to contain a x509 certificate and a
> pkcs#8 private key. It is part of my degree project (implemetation of
> sipping certs ietf draft).
>
> So, that is what I am doing:
>
> ("X509Certificate certificado" as a parameter)
> ("Request r" as a local variable)
>
> MimeMultipart mm = new javax.mail.internet.MimeMultipart();
> MimeBodyPart mbp1 = new MimeBodyPart();
> * mbp1.setContent(certificado, "application/pkix-cert");
> mm.addBodyPart(mbp1);
>
> OutputStream os = new ByteArrayOutputStream();
> mm.writeTo(os);
> r.setContent(os.toString(), hf.createContentTypeHeader ("multipart",
> "mixed"));
>
> the problem is that the *line throws an exception, because
> "application/pkix-cert" is not correctly managed by datahandler. Other
> tries went wrong too. So... I need some sample code to put any object
> into a multipart to be able to send it.
>
> Thank so much
>
> Alberto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
M. Ranganathan
"There are two ways to write error-free programs; only the third one
works." --  Alan Perlis
http://www.animenewsnetwork.com/encyclopedia/anime.php?id=1052