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-wssecurity-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.
-- 
View this message in context: 
http://www.nabble.com/NullPointerException-after-cxfEndpoint.getOutInterceptors%28%29.clear%28%29-tp15861038p15861038.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to