title: Java 11: import javax.xml.ws.WebFault: "Cannot resolve symbol ws"
body: <p>I'm attempting to upgrade a service to Java 11. </p>
  
  <p>We currently use wsdl2java (Apache CXF) to generate source code based on WSDLs. I'm doing this all via Maven. The source files generate properly based on the wsdl.</p>
  
  <p>Unfortunately, some of the source files generated include the following imports:</p>
  
  <pre><code>import javax.xml.ws.WebFault; 
  import javax.jws.WebService;
  </code></pre>
  
  <p>I'm missing the packages javax.xml.ws and javax.jws.</p>
  
  <p>In my research, I have discovered that Jaxb was deprecated out of the main JDK, thus I need to add new dependencies into my pom. I've tried various combinations, but they all come down to something like:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-core&lt;/artifactId&gt;
          &lt;version&gt;2.3.0.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
          &lt;version&gt;2.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-runtime&lt;/artifactId&gt;
          &lt;version&gt;2.3.2&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Unfortunately, no matter what I do, my IDE just can't seem to find javax.xml.ws and javax.jws.</p>
  
  <p>Does anyone know what dependency I may need to include so that I get these packages?</p>
  
  <p>And though it's not specifically at the core of the problem, here's my wsdl2java stuff:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
      &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.3.2&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;generate-sources&lt;/id&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;configuration&gt;
                  &lt;sourceRoot&gt;${project.build.directory}/generated-sources/cxf/&lt;/sourceRoot&gt;
  
                  &lt;wsdlRoot&gt;src/main/webapp/resources/wsdl/fedex&lt;/wsdlRoot&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.wsdl&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
              &lt;goals&gt;
                  &lt;goal&gt;wsdl2java&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>(Yes, I'm generating a fedex client).</p>