Search code examples
javawsdlconvertersuppercaselowercase

WSDL wsimport lower upper case issue


There is a WSDL file sent by a third party web service.

Back in February, my teammate converted the WSDL into java (Not sure which tool they used because they are not here any more). Our large-scaled project was built based on that.

Recently the web service party updated the WSDL. I tried to convert the new WSDL using wsimport. Now the problem is the those converted java classes are not compatible with the code base any more due to the package name changes (from upper case to lower case).

For example, import gov.services.food.api.DataCollection.Extensions.CaseClient is now changed to gov.services.food.api.datacollection.extensions.CaseClient

My questions is:

Does the choice of WSDL 2 Java convertor tool cause this kind of lower/upper case changes or even other data structure changes?

Thank you in advance.


Solution

  • Confirmed!

    The choice of different convertors does affect the java codes result. For the same convertor tool, different options that you pass in will also affect the result.

    In my particular case, I used 'ant' build tool.

    the core part in my build.xml is:

    <target name="wsdl2java">
        <java classname="org.apache.axis.wsdl.WSDL2Java" classpathref="DSSClient.classpath" failonerror="true" fork="true">
            <arg value="${wsdl.url}/DEX_august_2015.wsdl" />
            <arg line="-v -D -a" />
            <arg line="-o ${wsdl.url}/generated" />
            <arg line="-O -1" />
        </java>
    </target>
    

    And of course combined with the necessary jars that WSDL2Java requires.

    This should create the java codes with capitalized package names.