Hi Willem

I was thinking that it must be possible to figure this out at startup time. I 
remember that I read that there was some refactoring regarding the different 
http transports which would simplify the way to get this information.

I think it's error prone to configure it in the spring config if everything is 
already configured in tomcat server.xml and the web app name (servlet context 
name).

Thanks
Oli

________________________________________
Von: Willem Jiang [[email protected]]
Gesendet: Montag, 20. Juni 2011 12:03
An: [email protected]
Betreff: Re: Fully qualified endpoint address at startup time

It's hard to know what the exactly the services address is when you
start the the endpoint in the servlet or osgi container.
The address will be changed if your war or servlet configure is changed.

If you already know the physical address, you may consider to use
publishedEndpointUrl property to set the address which will be used in
the WSDL that is generate dynamically from CXF.

<jaxws:endpoint id="myEndpoint" address="MyServicePort"
serviceClass="org.apache.hello_world_soap_http.GreeterImpl" >
   <jaxws:properties>
     <!-- Set the publishedEndpointUrl which could override the service
address from generated WSDL as you want -->
     <entry key="publishedEndpointUrl"
value="http://www.simple.com/services/test"; />
    </jaxws:properties>
</jaxws:cxfEndpoint>


On 6/18/11 2:42 PM, Oliver Wulff wrote:
> Hi there
>
> Does there exist a way to figure out the fully qualified endpoint address for 
> an http based endpoint at startup time independent of the underlying 
> container (servlet, osgi, jetty)?
>
> The following way works for an incoming request but I'm looking for a way 
> during startup:
>
> HttpServletRequest req = (HttpServletRequest)msg.get("HTTP.REQUEST")
> if (req != null) {
> ... = req.getRequestUrl();
> }
>
>
> Thanks
> Oli
>


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to