You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christoph Lutz <Ch...@cib.de> on 2013/02/19 18:42:00 UTC
Changing language of javadoc-comments generated by wsdl2java
Hi,
I generate java-classes with wsdl2java (from cxf-2.7.3-package, called via ant-task), but the generated comments are in German language. How is it possible to change the language of the generated java-sources (I want them to be in English)? I could not find any option/switch to change this behaviour in wsdl2java. Is there a global option or something else that I might have overseen?
My current ant-target:
<target name="cxfWSDLToJava">
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
<arg value="-client" />
<arg value="-verbose" />
<arg value="-d" />
<arg value="src/main/java" />
<arg value="-p" />
<arg value="de.cib.myPackage" />
<arg value="MyTestService.wsdl" />
<classpath>
<path refid="cxf.classpath" />
</classpath>
</java>
</target>
Example-snippet (from the currently generated java files):
...
/**
* <p>Java-Klasse für anonymous complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
...
Expected Result:
...
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
...
Thank you very much in advance for your answer!
Best regards,
Christoph Lutz
Re: Changing language of javadoc-comments generated by wsdl2java
Posted by Glen Mazza <gl...@gmail.com>.
CXF uses JAXB RI to generate the classes (we have no control over it),
and the latter is internationalized. Unsure, but I think if you
configure your JDK to use English instead of German (living in the USA,
I've never had to do that so don't know how to help here), that problem
should go away.
Glen
On 02/19/2013 12:42 PM, Christoph Lutz wrote:
> Hi,
>
> I generate java-classes with wsdl2java (from cxf-2.7.3-package, called via ant-task), but the generated comments are in German language. How is it possible to change the language of the generated java-sources (I want them to be in English)? I could not find any option/switch to change this behaviour in wsdl2java. Is there a global option or something else that I might have overseen?
>
> My current ant-target:
>
> <target name="cxfWSDLToJava">
> <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
> <arg value="-client" />
> <arg value="-verbose" />
> <arg value="-d" />
> <arg value="src/main/java" />
> <arg value="-p" />
> <arg value="de.cib.myPackage" />
> <arg value="MyTestService.wsdl" />
> <classpath>
> <path refid="cxf.classpath" />
> </classpath>
> </java>
> </target>
>
>
> Example-snippet (from the currently generated java files):
> ...
> /**
> * <p>Java-Klasse für anonymous complex type.
> *
> * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
> *
> ...
>
> Expected Result:
> ...
> /**
> * <p>Java class for anonymous complex type.
> *
> * <p>The following schema fragment specifies the expected content contained within this class.
> *
> ...
>
>
> Thank you very much in advance for your answer!
>
> Best regards,
> Christoph Lutz
>
>
>
>
Re: Changing language of javadoc-comments generated by wsdl2java
Posted by Daniel Kulp <dk...@apache.org>.
Since you are forking it from Ant, you could probably add the system properties equivalent to:
-Duser.language=en -Duser.country=US
to tell the JVM to use the US settings. Not really sure. This is down inside JAXB someplace.
Dan
On Feb 19, 2013, at 12:42 PM, Christoph Lutz <Ch...@cib.de> wrote:
> Hi,
>
> I generate java-classes with wsdl2java (from cxf-2.7.3-package, called via ant-task), but the generated comments are in German language. How is it possible to change the language of the generated java-sources (I want them to be in English)? I could not find any option/switch to change this behaviour in wsdl2java. Is there a global option or something else that I might have overseen?
>
> My current ant-target:
>
> <target name="cxfWSDLToJava">
> <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
> <arg value="-client" />
> <arg value="-verbose" />
> <arg value="-d" />
> <arg value="src/main/java" />
> <arg value="-p" />
> <arg value="de.cib.myPackage" />
> <arg value="MyTestService.wsdl" />
> <classpath>
> <path refid="cxf.classpath" />
> </classpath>
> </java>
> </target>
>
>
> Example-snippet (from the currently generated java files):
> ...
> /**
> * <p>Java-Klasse für anonymous complex type.
> *
> * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
> *
> ...
>
> Expected Result:
> ...
> /**
> * <p>Java class for anonymous complex type.
> *
> * <p>The following schema fragment specifies the expected content contained within this class.
> *
> ...
>
>
> Thank you very much in advance for your answer!
>
> Best regards,
> Christoph Lutz
>
>
>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com