0

Upon regeneration of the webservice client from a wsdl with axis2 some of the classes get a new serialVersionUID. e.g.

private static final long serialVersionUID = 1325767162892L;

Because this changes the code its always a change for the VCS, even though its not a real change. It only seems to create those ids for Exception objects. Normal classes don't get those id upon generation.

Is there a way to:

  • Either always generate the same ID
  • Or stop wsdl2code from adding those ID

I'm running the wsdl2code with maven and the following options:

<plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>1.6.1</version>
    <executions>
        <execution>
            <goals>
                <goal>wsdl2code</goal>
            </goals>
            <configuration>
                <wsdlFile>MyWSDL.wsdl</wsdlFile>
                <outputDirectory>src/main/wsout</outputDirectory>
                <packageName>org.example.PackageName</packageName>
                <syncMode>sync</syncMode>
                <unpackClasses>true</unpackClasses>
                <allPorts>true</allPorts>
                <unwrap>true</unwrap>

                <overWrite>true</overWrite>
                <databindingName>adb</databindingName>
                <wsdlVersion>1.1</wsdlVersion>

            </configuration>
        </execution>
    </executions>
</plugin>
Udo Held
  • 12,314
  • 11
  • 67
  • 93
  • 1
    If the code of these classes is generated from the wsdl, why do you store those classes in the VCS in the first place? – JB Nizet Jan 12 '12 at 13:53
  • @JBNizet Thought about that as well. After regenerating the client you see what has changed so one can think about the impact on the application. Its more comfortable than analysing the wsdl. Additionally its probably about keeping everthing thats required at runtime in the VCS as well. I wouldn't want to rely on some compiled artifact without having the code. – Udo Held Jan 12 '12 at 14:33

0 Answers0