title: Change schemaLocation and soap:address location in runtime generated WSDL with JAX-WS
body: <p>Is it possible to configure the location (<code>schemaLocation</code> and <code>soap:address</code> <code>location</code>) in a JAX-WS WSDL?<br>
  When I deploy the sample below, 'servername' would be localhost and 'serverport' would be the local port number for the web application.</p>
  
  <p>However, I want to reconfigure these to be a proxy servername and serverport which redirects to the service. Is this possible and how would I achieve it?</p>
  
  <p>The deployment environment is Tomcat and Apache.</p>
  
  <p>I have the following service class:</p>
  
  <pre><code>@WebService
  public class AuthenticationService {
  ....
  public AuthenticationService(){}
  
  @WebMethod
      public AuthenticationResult checkAuthentication(
          @WebParam(name = "authentication") Authentication authentication,
          @WebParam(name = "privilege") Privilege privilege) {
      ....
  }
  }
  </code></pre>
  
  <p>When ran, the WSDL looks like this:</p>
  
  <pre><code>&lt;definitions targetNamespace="http://authentication.service.ws.ijs/" name="AuthenticationServiceService"&gt;
  &lt;types&gt;
  
      &lt;xsd:schema&gt;
          &lt;xsd:import namespace="http://authentication.service.ws.ijs/" schemaLocation="http://servername:serverport/WebAppName/AuthenticationService?xsd=1"/&gt;
      &lt;/xsd:schema&gt;
  &lt;/types&gt;
  
  &lt;message name="checkAuthentication"&gt;
      &lt;part name="parameters" element="tns:checkAuthentication"/&gt;
  &lt;/message&gt;
  
  &lt;message name="checkAuthenticationResponse"&gt;
      &lt;part name="parameters" element="tns:checkAuthenticationResponse"/&gt;
  &lt;/message&gt;
  
  &lt;portType name="AuthenticationService"&gt;
  
      &lt;operation name="checkAuthentication"&gt;
          &lt;input wsam:Action="http://authentication.service.ws.ijs/AuthenticationService/checkAuthenticationRequest" message="tns:checkAuthentication"/&gt;
          &lt;output wsam:Action="http://authentication.service.ws.ijs/AuthenticationService/checkAuthenticationResponse" message="tns:checkAuthenticationResponse"/&gt;
      &lt;/operation&gt;
  
  &lt;/portType&gt;
  
  &lt;binding name="AuthenticationServicePortBinding" type="tns:AuthenticationService"&gt;
      &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&gt;
  
      &lt;operation name="checkAuthentication"&gt;
          &lt;soap:operation soapAction=""/&gt;
  
          &lt;input&gt;
              &lt;soap:body use="literal"/&gt;
          &lt;/input&gt;
  
          &lt;output&gt;
              &lt;soap:body use="literal"/&gt;
          &lt;/output&gt;
      &lt;/operation&gt;
  
  &lt;/binding&gt;
  
  &lt;service name="AuthenticationServiceService"&gt;
  
      &lt;port name="AuthenticationServicePort" binding="tns:AuthenticationServicePortBinding"&gt;
          &lt;soap:address location="http://servername:serverport/WebAppName/AuthenticationService"/&gt;
      &lt;/port&gt;
  &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>