Re: How to get endpoint URL from ServletContext
Farrukh Najmi wrote:
>
> Here is what I have learned so far...
>
> If I want to get the precise protocol and port I have to get it from
> the ServletRequest not the ServletContext. reason is, as Jan said this
> is request specific an may vary from one request to another.
>
> With spring-ws it is fairly straightforward to get this once a request
> is being processed:
>
> TransportContext tc =
> TransportContextHolder.getTransportContext();
> WebServiceConnection wc = tc.getConnection();
> URI uri = wc.getUri();
>
> Viola! the URI has exactly what I need :-)
>
> Thanks very much Jan.
>
Excellent! :)
Jan