title: javax.xml.namespace.QName does not exist in Java 11
body: <p>I have problems when trying to run Java classes that were generated automatically from a wsdl with the javax.xml.namespace.QName attribute, it was working correctly in Java 7 but when changing version it stopped recognizing.
  pom.xml</p>
  <pre><code>&lt;dependency&gt;
           &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
            &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
            &lt;version&gt;${jackson.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;version&gt;${servlet.jstl.version}&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
              &lt;version&gt;${servlet.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.thymeleaf&lt;/groupId&gt;
              &lt;artifactId&gt;thymeleaf&lt;/artifactId&gt;
              &lt;version&gt;3.0.9.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
                &lt;groupId&gt;javax.xml.stream&lt;/groupId&gt;
                &lt;artifactId&gt;stax-api&lt;/artifactId&gt;
                &lt;version&gt;1.0-2&lt;/version&gt;
              &lt;/dependency&gt;   
          
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.8&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;com.thoughtworks.xstream&lt;/groupId&gt;
              &lt;artifactId&gt;xstream&lt;/artifactId&gt;
              &lt;version&gt;1.4.2&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;           
          
          &lt;!-- POI --&gt;        
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi&lt;/artifactId&gt;
              &lt;version&gt;3.13&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
              &lt;exclusions&gt;
                 &lt;exclusion&gt;
                    &lt;groupId&gt;commons-codec&lt;/groupId&gt;
                    &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
                 &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.9&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
              &lt;exclusions&gt;
                 &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
                    &lt;artifactId&gt;poi-ooxml-schemas&lt;/artifactId&gt;
                 &lt;/exclusion&gt;
                 &lt;exclusion&gt;
                    &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
                    &lt;artifactId&gt;xmlbeans&lt;/artifactId&gt;
                 &lt;/exclusion&gt;
                 &lt;exclusion&gt;
                    &lt;groupId&gt;stax&lt;/groupId&gt;
                    &lt;artifactId&gt;stax-api&lt;/artifactId&gt;
                 &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml-schemas&lt;/artifactId&gt;
              &lt;version&gt;3.9&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.xmlbeans&lt;/groupId&gt;
              &lt;artifactId&gt;xmlbeans&lt;/artifactId&gt;
              &lt;version&gt;2.3.0&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
                  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-logging&lt;/groupId&gt;
              &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
              &lt;version&gt;1.9.3&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;commons-codec&lt;/groupId&gt;
              &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
              &lt;version&gt;1.9&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;!-- Apache Commons IO --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;!-- Apache Commons Fileupload --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-fileupload&lt;/groupId&gt;
              &lt;artifactId&gt;commons-fileupload&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;!-- Apache Commons Lang3 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.4&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;commons-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;commons-collections&lt;/groupId&gt;
              &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
              &lt;version&gt;3.2.2&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;commons-digester&lt;/groupId&gt;
              &lt;artifactId&gt;commons-digester&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;!-- Java Activation --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.activation&lt;/groupId&gt;
              &lt;artifactId&gt;activation&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          &lt;!-- JavaMail extension --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.mail&lt;/groupId&gt;
              &lt;artifactId&gt;mail&lt;/artifactId&gt;
              &lt;version&gt;1.4.7&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
              &lt;version&gt;1.6.11&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
              &lt;version&gt;1.6.11&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;aopalliance&lt;/groupId&gt;
              &lt;artifactId&gt;aopalliance&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;4.3.5&lt;/version&gt;
              &lt;!--&lt;scope&gt;provided&lt;/scope&gt;--&gt;
          &lt;/dependency&gt;
          
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-datatype-json-org&lt;/artifactId&gt;
              &lt;version&gt;2.9.1&lt;/version&gt;
          &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
    &lt;artifactId&gt;jaxws-ri&lt;/artifactId&gt;
    &lt;version&gt;2.3.0&lt;/version&gt;
    &lt;type&gt;pom&lt;/type&gt;
  &lt;/dependency&gt; 
      &lt;/dependencies&gt;
  </code></pre>
  <p>I tried to add exclusions, for xml-apis but it still does not work I do not know what else to remove what else to add I am in a loop I try several things but I cannot reach the solution, mostly it always worked with Java-7 but currently it is making these changes in Java-11 and I can't get past this point because the only thing that causes me problems is: javax.xml.namespace.QName The package javax.xml.namespace is accessible from more than one module:, java.xml</p>
  <p>But in bookstores there is that dependency looking for them. I also leave the code that was generated which is causing problems. I would like to know if there is any solution. I would appreciate your support. I have already tried to find a solution for it for 1 week.</p>
  <p>Service.java</p>
  <pre><code>import java.net.URL;
  import javax.xml.namespace.QName;
  import javax.xml.ws.WebEndpoint;
  import javax.xml.ws.WebServiceClient;
  import javax.xml.ws.WebServiceFeature;
  
  @WebServiceClient(name = &quot;service&quot;, 
                    wsdlLocation = &quot;/wsdl/wsd_creado.wsdl&quot;,
                    targetNamespace = &quot;http://camel.apache.org/cxf/jaxws/dispatch&quot;) 
  public class Service extends javax.xml.ws.Service {
  
      public final static URL WSDL_LOCATION;
  
      public final static QName SERVICE = new QName(&quot;http://camel.apache.org/cxf/jaxws/dispatch&quot;, &quot;service&quot;);
      public final static QName Port = new QName(&quot;http://camel.apache.org/cxf/jaxws/dispatch&quot;, &quot;port&quot;);
      static {
          URL url = Service.class.getResource(&quot;/wsdl/wsd_creado.wsdl&quot;);
          if (url == null) {
              url = Service.class.getClassLoader().getResource(&quot;/wsdl/wsd_creado.wsdl&quot;);
          } 
          if (url == null) {
              java.util.logging.Logger.getLogger(Service.class.getName())
                  .log(java.util.logging.Level.INFO, 
                       &quot;Can not initialize the default wsdl from {0}&quot;, &quot;/wsdl/wsd_creado.wsdl&quot;);
          }       
          WSDL_LOCATION = url;
      }
  
      public Service(URL wsdlLocation) {
          super(wsdlLocation, SERVICE);
      }
  
      public Service(URL wsdlLocation, QName serviceName) {
          super(wsdlLocation, serviceName);
      }
  
      public Service() {
          super(WSDL_LOCATION, SERVICE);
      }
      
      public Service(WebServiceFeature ... features) {
          super(WSDL_LOCATION, SERVICE, features);
      }
  
      public Service(URL wsdlLocation, WebServiceFeature ... features) {
          super(wsdlLocation, SERVICE, features);
      }
  
      public Service(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
          super(wsdlLocation, serviceName, features);
      }    
      @WebEndpoint(name = &quot;port&quot;)
      public AbsenceContingent getPort() {
          return super.getPort(Port, AbsenceContingent.class);
      }
      @WebEndpoint(name = &quot;port&quot;)
      public AbsenceContingent getPort(WebServiceFeature... features) {
          return super.getPort(Port, AbsenceContingent.class, features);
      }
  
  }
  </code></pre>
  <p>If there is an error within the pom.xml that can be corrected or if I have to modify the code or there is another method that has to change in java-11, I would appreciate your support.</p>