Yes, You can do that through the configuration,
Besides, You can also get the default bus from the BusFactory, and add
the interceptors into the bus.
see
systests/src/test/java/org/apache/cxf/systest/ws/addr_feature/WSAClientServerTest.java
James
Team,
The code for adding interceptors to a web service is shown on this
page[1] as follows:
---------------------------------------------------
import javax.xml.ws.Endpoint;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.EndpointImpl;
EndpointImpl ep = (EndpointImpl)
Endpoint.publish("http://localhost/service", service);
ep.getServer().getEndpoint().getInInterceptors().add(new
LoggingInInterceptor());
ep.getServer().getEndpoint().getOutInterceptors().add(new
LoggingOutInterceptor());
----------------------------------------------------
Question: If I am not creating a web service is this manner, but am
instead just implementing an SEI created from wsdl2java (to be wrapped
up in a servlet WAR file), then I *cannot* add interceptors
programmically as above--in this case, I would have to use configuration
files, correct?
Just want to clarify this point for the documentation.
Thanks,
Glen
[1] http://cwiki.apache.org/confluence/display/CXF20DOC/Debugging