THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
On the Server side, you'll want to add the interceptors to your CXF Endpoint. If you're publishing your service using the JAX-WS APIs, you can get your CXF endpoint like this:
Code Block | ||||
---|---|---|---|---|
| ||||
import org.apache.cxf.endpoint.Endpoint; import org.apache.cxf.jaxws.EndpointImpl; EndpointImpl jaxWsEndpoint = (EndpointImpl) Endpoint.publish("http://host/service", myServiceImpl); Endpoint cxfEndpoint = jaxWsEndpoint.getServer().getEndpoint(); |
If you've used the (JaxWs)ServerFactoryBean, you can simply access it via the Server object:
Code Block | ||||
---|---|---|---|---|
| ||||
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.frontend.ServerFactoryBean;
ServerFactoryBean factory = ...;
...
Server server = factory.create();
Endpoint cxfEndpoint = server.getEndpoint();
|
...