wsdl2java generated code causes character encoding problems

ぐ巨炮叔叔 提交于 2021-02-10 05:57:06

问题


I have generated a bunch of java-files from a WSDL source. I used Apache CXF 2.6.1 for generating the files.

When I put the code onto our production box that is running jetty and maven and I send a request to the server via the generated java-files it somehow changes the systems/JVM character encoding. The swedish characters å, ä and ö changes into Ã¥, ä, ö.

I can't reproduce this on my own box.

Someone have any idea?


回答1:


Since version 2.5.4 there is a new command line option -encoding which is not yet documented on the official documentation. But when you call the tool with the help option (-h|-help) you will see the encoding option:

wsdl2java ... -encoding UTF-8 ....


来源:https://stackoverflow.com/questions/12180231/wsdl2java-generated-code-causes-character-encoding-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!