axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Afkham Azeez" <afk...@gmail.com>
Subject [Axis2] MIME Parsing fails with Sun's JavaMail API Implementation
Date Thu, 02 Mar 2006 04:29:42 GMT
Hi Folks,
I encountered a somewhat critical situation, where if we use Sun's
JavaMail API implementation, instead of Geronimo's JavaMail API
implementation, parsing of MIME Encoded messages fails. The initial
failure occurs in the javax.mail.internet.ContentType class, where we
pass in the Content-Type header.

I reckon when we deploy axis2.war in Tomcat, if  the Sun JavaMail API
implementation gets placed ahead of Gernimo's implementation, we'll
not be able to process MIME Encoded messages. Thoughts?

FYI, I'm attaching a stacktrace below:
----------------------------------------------- Stack Trace
-----------------------------------------------------
org.apache.ws.commons.om.OMException: Invalid Content Type Field in
the Mime Message
        at org.apache.ws.commons.attachments.MIMEHelper.<init>(MIMEHelper.java:112)
        at org.apache.axis2.transport.TransportUtils.selectBuilderForMIME(TransportUtils.java:204)
        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:97)
        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
        at org.apache.axis2.saaj.SOAPPartImpl.<init>(SOAPPartImpl.java:126)
        at org.apache.axis2.saaj.SOAPMessageImpl.<init>(SOAPMessageImpl.java:68)
        at org.apache.axis2.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:160)

caused by:
javax.mail.internet.ParseException
	at javax.mail.internet.ParameterList.<init>(ParameterList.java:81)
	at javax.mail.internet.ContentType.<init>(ContentType.java:82)
-------------------------------------------- End of Stack Trace
---------------------------------------------

The relevant Content-Type header valueis;
multipart/related;
boundary=MIMEBoundaryurn:uuid:F02ECC18873CFB73E211412712924004;
type=application/xop+xml;
start=<0.urn:uuid:F02ECC18873CFB73E211412712924005@apache.org>;
start-info=text/xml; charset=UTF-8

The above header is Parsed successfully if we use Geronimo's implementation.

--
Thanks
Afkham Azeez

Mime
View raw message