title: Maven Using JAX-WS 2.1 Instead of JAX-WS 2.2
body: <p>I am using Netbeans 7 with Maven 2.2.1 and jaxws-maven-plugin 1.12. Code is deployed on Glassfish 3.1 - or will be when I get it to compile :)</p>
  
  <p>When I build the project, the wsimport runs as expected and generates the source files from the WSDL provided. The problem is that the build fails during the compile phase with the following three exceptions. From researching this, I see that these constructors were added from JAX-WS 2.1 to JAX-WS 2.2. My belief is that the wsimport is using JAX-WS 2.1 and the compile is using JAX-WS 2.2.</p>
  
  <p>Can someone confirm my suspicion? Or, if I'm wrong, might you have an idea what may be causing this?</p>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p><strong>UPDATED/CLARIFICATION OF PROBLEM</strong>
  The Web service client extends javax.xml.ws.Service and the error is thrown when the client tries to call the super class constructor with three arguments. Since the super class doesn't have any constructor with three arguments, it fails. </p>
  
  <p>javax.xml.ws.Service is found in JDK SE 1.6 and JAX-WS 2.1 as the wrong version.</p>
  
  <p>javax.xml.ws.Service is found in JAX-WS 2.2 as the <strong>correct version.</strong></p>
  
  <hr>
  
  <p>The error occurs three times since it is in three overridden constructors but it's the same error so I've included it only once.</p>
  
  <pre><code>cannot find symbol
  symbol  : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
  location: class javax.xml.ws.Service
  
  
  &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;jaxws-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.12&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;wsimport&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;wsdlFiles&gt;
                              &lt;wsdlFile&gt;*path to WSDL*&lt;/wsdlFile&gt;
                          &lt;/wsdlFiles&gt;
                          &lt;wsdlLocation&gt;*url to WSDL*&lt;/wsdlLocation&gt;
                          &lt;staleFile&gt;${project.build.directory}/jaxws/stale/BudgetCheckingServiceService.stale&lt;/staleFile&gt;
                      &lt;/configuration&gt;
                      &lt;id&gt;wsimport-generate-BudgetCheckingServiceService&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;com.sun.xml.ws&lt;/groupId&gt;
                      &lt;artifactId&gt;jaxws-tools&lt;/artifactId&gt;
                      &lt;version&gt;2.2.6-SNAPSHOT&lt;/version&gt;                            
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                      &lt;groupId&gt;javax.xml&lt;/groupId&gt;
                      &lt;artifactId&gt;webservices-api&lt;/artifactId&gt;
                      &lt;version&gt;1.4&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;configuration&gt;                    
                  &lt;sourceDestDir&gt;${project.build.directory}/generated-sources/jaxws-wsimport&lt;/sourceDestDir&gt;
                  &lt;xnocompile&gt;true&lt;/xnocompile&gt;
                  &lt;verbose&gt;true&lt;/verbose&gt;
                  &lt;extension&gt;true&lt;/extension&gt;
                  &lt;catalog&gt;${basedir}/src/jax-ws-catalog.xml&lt;/catalog&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>