Hi Allesandro,

Have you had any luck with this yet?

I would imagine you could accomplish this by using a "StringOutputStream" to
capture the output of the MimeMultipart's writeTo method, and then use that
as the string to place in an encapsulated data object.

Here's an example of how to create a StringOutputStream:
http://www.m0interactive.com/archives/2006/11/30/convert_a_outputstream_to_a_java_string.html

Cheers,
James


On Wed, Jul 8, 2009 at 11:56 AM, alessandro
<[email protected]>wrote:

> Hi all, I will be very happy to have an help about this:
>
> I have to do add the CDA-basedMML in to the OBX-5 of a MDM^T02  HL7 v.2.3.1
>
> the CDA-basedMML document is a multimedia object
> and it is exchanged as a package in MIME
> (Multipurpose Internet Mail Exchange: RFC2046)
> format and encoded as an encapsulated data type
> (ca.uhn.hl7v2.model.v231.datatype.ED ?).
>
> but the  the ED tpye accept only String setting data:
>
> I write this code:
>
> ED encapsuledData = obx.getObservationValue(0).getData();
>
> encapsuledData.getTypeOfData().setValue("multipart");
> encapsuledData.getDataSubtype().setValue("x-hl7-cda-level-one");
> encapsuledData.getEncoding().setValue("A");
>
> and then i have
> encapsuledData.getData().setValue(String value) ???
>
>
> It's possible to add an object like this?
>
> javax.mail.internet.MimeMultipart mimeMessage = new
>                 javax.mail.internet.MimeMultipart();
>
> MimeBodyPart parteUno= new MimeBodyPart( inputStream );
> mimeMessage.addBodyPart(parteUno);
>
> Thanks a lot
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to