title: Web Service - Tomcat - Behind proxy - wsdl location
body: <p>I have a Java webservice running on Tomcat in our internal environment. Let's say the wsdl is </p>
  
  <pre><code>http://actual:8080/app/temp?wsdl
  </code></pre>
  
  <p>To provide access to this webservice from outside the network, we created a proxy using Apache on another server and used ProxyPass to do something like</p>
  
  <pre><code>ProxyPass /app/temp http://actual:8080/app/temp
  </code></pre>
  
  <p>So externally when we access proxy/app/temp over http, it gets diverted to actual:8080/app/temp just fine. So no issues with that, and I can also access the wsdl. </p>
  
  <p>But the WSDL has references to "actual" server for the "webservice location" on the port. This causes failure when an actual call is made to the webservice methods from a client.</p>
  
  <p>Any ideas on how this can be fixed, please? Thanks.</p>
  
  <p>Note: The client is generated using Metro. I found a way to force a different endpoint in the client using a code like below. But I am looking more for a pure proxy solution that we can do, instead of developers using our webservice having to touch their code. </p>
  
  <pre><code>((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://proxy/app/temp?wsdl");
  </code></pre>