cxf wsdl2java generating java files but with wrong encoding
0 posts in topic
Thread View Thread View

cxf wsdl2java generating java files but with wrong...
Wed Sep 12, 2012 04:46 AM

I am a total beginner when it comes to Ant. I have the following code which generat course code in Java. The problem is some of these generated Java file contain utf-8 characters in the code. I need to tell by Ant some how to when Java files are generated encode them to utf-8... but how???

This is my code

<macrodef name="lpwservice">
    <attribute name="name"/>
    <attribute name="package"/>
        <property name="wsdlfile" value="${portal.basedir}/lpw/wsdl/@{name}.wsdl"/>

        <mkdir dir="${portal.basedir}/lpw/wsdl"/>
        <get src="${lpw.baseuri.cxf}/@{name}?wsdl" dest="${portal.basedir}/lpw/wsdl/@{name}.wsdl.new"/>
                <filesmatch file1="${portal.basedir}/lpw/wsdl/@{name}.wsdl" file2="${portal.basedir}/lpw/wsdl/@{name}.wsdl.new"/>
                <uptodate targetfile="${portal.basedir}/lpw-wsdl.jar" srcfile="${portal.basedir}/lpw/wsdl/@{name}.wsdl"/>
                <echo message="${wsdlfile} is up to date" level="info"/>
                <delete file="${portal.basedir}/lpw/wsdl/@{name}.wsdl.new"/>
                <echo message="${portal.basedir}/lpw/wsdl/@{name}.wsdl needs update" level="info"/>
                <move file="${portal.basedir}/lpw/wsdl/@{name}.wsdl.new" tofile="${portal.basedir}/lpw/wsdl/@{name}.wsdl" overwrite="true" />
                <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true" failonerror="true">
                    <arg value="-client"/>
                    <arg value="-d"/>
                    <arg value="${portal.basedir}/lpw/src"/>
                    <arg value="${portal.basedir}/lpw/wsdl/@{name}.wsdl"/>
                        <path refid="cxf.classpath"/>

As you see at the line 
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true" failonerror="true">
I would need to make WSDLToJava to encode files to utf-8. Do you have any idea?
Many thanks
About | Sitemap | Contact