dev@jax-ws.java.net

Re: MIMEParser creating garbled header

From: Martin Grebac <martin.grebac_at_oracle.com>
Date: Fri, 30 Nov 2012 12:34:02 +0100

Hi,
  yes, you're at the right place - thanks for the patch. May I ask you
to file this as a bug into mimepull issue tracker
(http://java.net/jira/browse/MIMEPULL) with a testcase - it seems you
already have one? Thanks,
  MartiNG

On 11/30/12 11:45 AM, jayashree viswanathan wrote:
> Hi ,
>
> When we run MTOM test with one of the client/server as platform with
> ascii encoding and other as non-ascii encoding , while creating a
> mimeHeader , the code seems to fall back to native charset creating a
> garbled header and thus causing the below exception .
>
> When client read response back from the server as it is not able to
> understand headers as it expects in ASCII format but it is actually
> not in ASCII , thus throwing the "Didn't get Headers even after
> complete parsing"
>
> Couldn't create SOAP message due to exception:
> java.lang.IllegalStateException:Internal Error. Didn't get Headers
> even after complete parsing.
>
> Caused by: java.lang.IllegalStateException: Internal Error. Didn't get
> Headers even after complete parsing.
> at
> com.sun.xml.internal.org.jvnet.mimepull.MIMEPart.getHeaders(MIMEPart.java:145)
>
> at
> com.sun.xml.internal.org.jvnet.mimepull.MIMEPart.getContentType(MIMEPart.java:135)
>
> at
> com.sun.xml.internal.ws.encoding.MimeMultipartParser$PartAttachment.getContentType(MimeMultipartParser.java:168)
>
> at
> com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:343)
>
> at com.sun.xml.internal.ws.encoding.MimeCodec.decode(MimeCodec.java:181)
> at
> com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:282)
>
>
> Please find attached the patch that fixes the problem , the fix is in
> *MIMEParser.java* file from *org.jvnet.mimepull* package , which is
> also part of*com.sun.internal.xml**.org.jvnet.mimepull* , to create a
> internetHeaders only in ascii charset .
>
> This is also reproducible on JDK8/JDK7 .
>
> If this is is not the right place to talk about MIMEPull - jaxws
> dependency code please let me know which is the right mail id to
> discuss the same .
>
> Thanks and Regards,
> Jayashree Viswanathan
>
>

-- 
Martin Grebac, SW Engineering Manager (Metro/JAXWS/JAXB RI)
Oracle Czech, Prague
http://blogs.oracle.com/mgrebac
ICQ: 93478885