Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the encoding of wsimport-generated files?

Tags:

java

jax-ws

I am using the wsimport ant task of JAX-WS to generate sources based on some wsdl.

However, these generated sources all seem to be UTF-8 encoded. Is there a way to change the encoding of the files wsimport task produces?

like image 788
Sylar Avatar asked Dec 10 '09 14:12

Sylar


1 Answers

This is somewhat badly documented. WSImport uses XJC (from JAXB) to create Java files and the documentation here indicates that changing the character encoding in the XML file should suffice (although I have not tried this). If you are content with running JAXB by hand then you can also configure this via the JAXB_ENCODING property on your JAXBContext.

like image 156
Lars Tackmann Avatar answered Sep 20 '22 17:09

Lars Tackmann