title: Controlling JAX-WS wsdlLocation attribute value's (absolute path) with jaxws-maven-plugin
body: <p>I have a JAX-WS-driven web service whose WSDL we generate a web service client from in another Maven module (which I'll call <code>ws-consumer</code>).</p>
  
  <p>For better or worse, we copy the "published WSDLs" (the version of the WSDL &amp; XSDs that the service held/generated at point of release) to our <code>src/wsdl</code> folder of <code>ws-consumer</code> and then use <code>jaxws-maven-plugin</code> from org.jvnet to generate a client using <code>jaxws:wsimport</code> with the following (truncated) configuration:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.jvnet.jax-ws-commons&lt;/groupId&gt;
          &lt;artifactId&gt;jaxws-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;!--phase&gt;generate-sources&lt;/phase --&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;wsimport&lt;/goal&gt;
                  &lt;/goals&gt;
                  &lt;configuration&gt;
                      &lt;wsdlDirectory&gt;src/main/resources/META-INF/wsdl/&lt;/wsdlDirectory&gt;
                      &lt;wsdlFiles&gt;
                          &lt;wsdlFile&gt;MyWS/MyWS.wsdl&lt;/wsdlFile&gt;
                      &lt;/wsdlFiles&gt;
                  &lt;/configuration&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>Now, the generated client code has the following annotations applied at the class level:</p>
  
  <pre><code>@WebServiceClient(name = "MyWS", targetNamespace = "http://myws/blah", wsdlLocation = "**file:/C:/some/absolute/path/src/main/resources/META-INF/wsdl/MyWS/MyWS.wsdl"**)
  </code></pre>
  
  <p><em>emphasis mine</em></p>
  
  <p>As you can hopefully see, the <code>wsdlLocation</code> attribute value has a hard-coded absolute path that is going to be incorrect when the service is deployed.</p>
  
  <p>Is there any way I can "control" this by setting it to just <code>META-INF/wsdl/MyWS/MyWS.wsdl</code> or some other value?</p>