title: How can I change the autogenerated soap:address from a JAX-WS webservice WSDL deployed with Spring
body: <p>I have a webservice implementation generated using wsimport from a WSDL. This service is deployed in a Tomcat server in a Spring webapp. The spring configuration file (only the webservice part) is like this</p>
  
  <pre><code>&lt;wss:binding url="/fooService"&gt;
      &lt;wss:service&gt;
          &lt;ws:service bean="#fooService"&gt;
      &lt;/wss:service&gt;
  &lt;/wss:binding&gt;
  </code></pre>
  
  <p>When I deploy this webapp in tomcat, I can get the WSDL if I go to </p>
  
  <pre><code>http://localhost:8080/foo/fooService?wsdl 
  </code></pre>
  
  <p>and the wsdl soap:address property is like this:</p>
  
  <pre><code>&lt;service name="FooService"&gt;
      &lt;port name="FooService" binding="tns:FooServiceBinding"&gt;
          &lt;soap:address location="http://localhost:8080/foo/fooService"/&gt;
      &lt;/port&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>And for now, it's all ok.</p>
  
  <p>The problem is that in production, we have an Apache web server and this server redirects the requests to Tomcat. It works too, but when we get the WSDL, the soap:address is still localhost:8080 and we need this  to be the public url to the webservice.</p>
  
  <p>Any ideas?</p>
  
  <p>Thank you very much.</p>