cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nicolas de loof (JIRA)" <>
Subject [jira] Commented: (CXF-2450) WSDL2java uses system encoding when generating java classes
Date Tue, 13 Oct 2009 08:11:31 GMT


nicolas de loof commented on CXF-2450:

This issue is related to JAXB xjc :

com.sun.codemodel.writer.CodeWriter#openSource  uses the OutputStreamWriter encoding to set
the CharsetEncoder to use :

OutputStreamWriter bw = new OutputStreamWriter(openBinary(pkg,fileName));
CharsetEncoder encoder = EncoderFactory.createEncoder(bw.getEncoding());

It SHOULD instead build a CharsetEncoder based on the user-requested encoding (may fallback
to default platform encoding) and THEN create the OutputStreamWriter with this encoder...

CharsetEncoder encoder = EncoderFactory.createEncoder( getUserDefinedEncoding() );
OutputStreamWriter bw = new OutputStreamWriter(openBinary(pkg,fileName), encoder);

I just can't report this suggestion to JAXB as is unreachable for some days :'(

> WSDL2java uses system encoding when generating java classes
> -----------------------------------------------------------
>                 Key: CXF-2450
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>            Reporter: Mads Jensen
> When using wsdl2java java classes are created in default encoding(for instance MacRoman).
But when we afterwards try to compile these classes in UTF-8 special chars in java comments
resolves in compliations error
> [INFO] Compilation failure
> /url/to/file/[31,18] unmappable character for encoding UTF-8
> We would like somehow to specify which encoding wsdl2java should use when generating
java classes. We can't seem to find this property.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message