I tried implementing the WSDL dynamic-location solution using WsdlDefinitionHandlerAdapter, and I ran into a slight problem. Apparently the rewrite of the location URL does not include the web context from the request - only the scheme, host, and port is modified. So if I deploy my WAR file to another web context in my app server, then the new context is not picked up.
Actual rewritten WSDL
<soap:address location="http://localhost:8080/pcc-web/services" />
Expected rewritten WSDL
<soap:address location="https://www.myhost.com/pcc-web/services" />
I think that the web context should be updated in addition to the scheme, host, and port. What do you think?
<soap:address location="https://www.myhost.com/production/services" />