javamail throw ParseException with multipart/related SOAP message
843830Jun 26 2004 — edited Jun 27 2004we got a problem when receiving a mime message (part of a SOAP message) like this..
POST /mms/service HTTP/1.0
Content-Type: multipart/related; boundary="NextPart_000_0125_01C19839.7237929064"; type=text/xml; start=<0406211847590000000003>
Content-Length: 14677
SOAPAction: ""
--NextPart_000_0125_01C19839.7237929064
Content-Type: text/xml; charset="ks_c_5601-1987"
Content-ID: <0406211847590000000003>
<?xml version="1.0" encoding="euc-kr" ?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
......
JavaMail 1.3.1 throw a javax.mail.internet.ParseException like this...
javax.mail.internet.ParseException
at javax.mail.internet.ParameterList.<init>(ParameterList.java:81)
at javax.mail.internet.ContentType.<init>(ContentType.java:82)
at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:125)
at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:43)
at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:32)
at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
.................
I found parameter values in Content-Type header was the reason.. (values of 'type' and 'start' parameters)
if parameter values are quoted like below,,, JavaMail works well.
Content-Type: multipart/related; boundary="NextPart_000_0125_01C19839.7237929064"; type="text/xml"; start="<0406211847590000000003>"
i found related article in bug database.. and they say, parameter values must be quoted, and it is not a JavaMail bug. !!
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5039094
so.. i searched rfc documents (rfc 2112 and others..) and found this words, " the parameter values will usually require quoting "
http://lists.beepcore.org/public/rfc/html/rfc2112.html#anchor5
i'm confused... values must be quoted ? or may not be quoted ?
i think... JavaMail should accept not-quoted values.. what do you think about it.. ?
anyway,,, i need a solution....how can i make JavaMail accept not-quoted parameter values...
anyone knows a technical tip ?