0

I'm having problems with code generated from wdl while porting from Java 8 to Java 11.

Using maven 3.8.7 in both cases.

This is the pom.xml file that has been working with Java 1.8.0

<plugin>
  <groupId>org.jboss.ws.plugins
  <artifactId>maven-jaxws-tools-plugin
  <version>1.1.2.Final</version>
  <configuration>
     <wsdls>
        <wsdl>some/dir/junk.wsdl</wsdl>
     </wsdls>
  </configuration>
  <executions>
     <execution>
        <goals>
           <goal>wsconsume</goal>
        </goals>
     </execution>
  </executions>
</plugin>

Here is the relevant snippet from the wdl that I'm using: junk.wsdl

<definitions targetNamespace = "URN:blah:blah:someClass:1.0"

I have no control over the wsdl as it is controlled by another entity. When I run mvn clean package, it creates a class named someClass.java which contains the line

 package  blah.blah.someClass._1_0;

When I do this with my updates for java 11 code (pom shown below), I do not get any errors, but the package name is missing the "_0"

 package  blah.blah.someClass._1;

Here is the pom.xml after I've updated it to use wsimort instead of wsconsume.

Java 11.0.20 pom.xml

<plugin>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-maven-plugin</artifactId>
  <version>2.3.2</version>
  <configuration>
     <wsdlDirectory>some/dir</wsdlDirectory>
     <wsdlFiles>
        <wsdl>junk.wsdl</wsdl>
     </wsdlFiles>
     <extension>true</extension>
  </configuration>
    <executions>
     <execution>
        <goals>
           <goal>wsimport</goal>
        </goals>
     </execution>
  </executions>
  <dependencies>
     <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-tools</artifactId>
        <version>2.3.2</version>
     </dependency>
  </dependencies>
</plugin>

I have never completely wrapped my head around web services and such, but I strongly suspect that the _0 at the end of the namespace is important. Meaning, I have not properly upgraded this portion of the code.

So, does that _0 matter, and if so, how to I get wsimport to preserve it?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.