OK, I see how you can programatically add handlers to a web service if you are using the manual endpoint.publish() method (similar to the first code block in "Logging Messages" in [1]) but what if you're creating an SEI implementation that runs with CXFServlet? (i.e., the MyWebServicePortTypeImpl in the second coded block in [1]) -- can you add code attaching the handler within an SEI implementation? (No big deal if we can't, even the JAX-WS specification does not seem to support this. I just want to make sure I know of all the options--I'll update our docs with this info.)
Thanks, Glen [1] http://cwiki.apache.org/CXF20DOC/debugging.html 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 >>>> >>>> >>>> >>> >>> >> > > > -- View this message in context: http://www.nabble.com/JAX-WS-handler-attachment-options-within-Apache-CXF-tp14499697p14552937.html Sent from the cxf-user mailing list archive at Nabble.com.