I also think we need to provide spring configuration for attaching handler chain through
spring configuration .
I'd like to see there is api in JaxWsProxyFactoryBean, EndpointImpl and JaxwsServerFactoryBean that
we can configure the Handler with spring configuration, eg :

<jaxws:endpoint id="addHandler" implementor="org.apache.cxf.jaxws.service.Hello" address="http://localhost:8080/test";>
   <jaxws:handlers>
     <bean class="org.apache.cxf.LogHandler"/>
   </jaxws:handlers>
 </jaxws:endpoint>

Regards

Jim


Willem Jiang wrote:
For the server side, you may set the HandlerChain after the endpoint.publish is called.

Willem.

James Mao wrote:
Probably this way is safer

getBinding().getHandlerChain().add(YourHandler)

James

Glen,

The answer is YES, you can do it programmatically

Service side API

Endpoint.getBinding().setHandlerChain(List<Handler>)


Client side API

BindingProvider.getBinding().setHandlerChain(List<Handler>)

Besides, the Service API

Service.setHandlerResolver()

Hope it helps,
James

Hello,

The JAX-WS specification--as well as our jax-ws handler
sample[1]--specify/show two ways to attach a JAX-WS handler to a CXF
client or service:

1.) For the service, configuration via annotations and an XML file
(e.g., under /commons in [1]).

2.) For the client, programmatically within the Java class making the
web service call.

Question:  Does anyone know of additional ways one can attach a JAX-WS
handler to the web service or client?  For example, can I
programmatically attach handlers to the web service implementation, or
do XML configuration of handler chains on the *client* side?

Thanks,
Glen

[1] http://tinyurl.com/2ps3y2






Reply via email to