The issue is that you are probably clearing out a bunch of interceptors (like all the soap interceptors) that need to be there. Most likely, the null pointer is not due to it being empty, but due to something else expecting a particular interceptor to be there.
Before calling clear, can you see which interceptors are there? In general, only remove the interceptors that you added. Dan On Wednesday 05 March 2008, Landslide wrote: > If I have a CXF client which is set as > (BindingProvider.SESSION_MAINTAIN_PROPERTY, true), I do not want the > client to send the following <soap:Header> tag for all subsequent > requests after the first successful request: > > <soap:Header> > <wsse:Security > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-ws >security-secext-1.0.xsd" soap:mustUnderstand="1"> > </wsse:Security> > </soap:Header> > > If I do so by: > cxfEndpoint.getOutInterceptors().clear(); > the CXF API gives me an erorr as below: > Mar 5, 2008 4:20:14 PM org.apache.cxf.phase.PhaseInterceptorChain > doIntercept > INFO: Interceptor has thrown exception, unwinding now > java.lang.NullPointerException > > If I use an SOAP client coded with the Axis2 API, I can do so after > the first successful request with no issue by calling: > client.disengageModule("rampart"); > > It seems to me that the CXF API should check if the list of > OutInterceptors is empty or not, and would do nothing if it is indeed > empty. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
