title: Can I intercept calls for my WSDL on Glassfish (or on any app server)?
body: <p>I've created a Java web service using the <code>@WebService</code> annotation and deployed the service to a Glassfish server that lives behind a proxy server.</p>
  
  <p>The problem is when someone accesses our WSDL and looks at the service endpoint address location they see</p>
  
  <pre><code>http://app server url/service...
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>http://proxy server url/service...
  </code></pre>
  
  <p>I'd like to have the proxy server URL returned in the service endpoint address location of the WSDL instead of the app server url.</p>
  
  <p>What I'm wondering is, can I write a Filter or a Listener to listen for requests to the WSDL, then modify the WSDL service endpoint address with the proxy server URL?  What might be the recommended way to do this - I was thinking a Filter is the best choice, but wasn't 100% sure?</p>
  
  <p>BTW - I thought there might be a simple setting in Glassfish to do this, but <a href="https://stackoverflow.com/questions/2142924/override-glassfish-generated-wsdl-service-endpoint-address">I haven't been able to locate one that works</a>.</p>