Parsing Mime message

HiWe are using JWSDP 2.0 Web Services in an application we are working on. It requires receiving attachments with mime encoding. Could someone please tell me how to parse the attachments to separate files using JWSDP 2.0 SAAJ.Thanks a lot/Kristofer
[276 byte] By [kribora] at [2007-11-26 22:53:35]
# 1

Got it working thanks to jwsdp mailing list... Setting content type to null forces check of getContentType internally from the DataSource..

--CODE START--

//receive is the ws client implementation

Map<String, Object> responseContext = ((javax.xml.ws.BindingProvider)receive).getResponseContext();

HashMap map = (HashMap) responseContext.get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);

key = key.substring(1, key.length()-1);

//Use the key to get the DataHandler

DataHandler attachments = (DataHandler) att.get(key);

MimeMultipart mmp = new MimeMultipart(attachments.getDataSource(), null);

MimeBodyPart mbp = mmp.getBodyPart(0); etc...

--CODE END--

kribora at 2007-7-10 12:16:57 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...