Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wsdl2java generated code causes character encoding problems

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?

like image 246
brange Avatar asked Dec 31 '25 03:12

brange


1 Answers

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 ....
like image 86
Heri Avatar answered Jan 06 '26 07:01

Heri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!