Hi,
I have a CXF endpoint running in Camel (2.8.4) on SMX 4.4.1 (same happens on
4.4.0).
I'm getting a NPE here:
at
org.apache.cxf.interceptor.FaultOutInterceptor.getFaultForClass(FaultOutInterceptor.java:163)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.interceptor.FaultOutInterceptor.handleMessage(FaultOutInterceptor.java:67)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:111)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:323)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[141:org.apache.cxf.bundle:2.4.6]
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)[141:org.apache.cxf.bundle:2.4.6]
...
There's a similar issue, CXF-4072 to this, but in my case the WSDL does have
a single part.
https://issues.apache.org/jira/browse/CXF-4072
These cases are ok:
1. If WSS Headers are correctly added, there's no problem.
2. With invalid WSA Action, and no WSS. Get correct fault about WSS - "An
error was discovered processing the <wsse:Security> header"
In this case FaultOutInterceptor line 63:
BindingOperationInfo bop =
message.getExchange().get(BindingOperationInfo.class);
bop is null, which means the getFaultForClass isn't called.
3. With invalid WSA Action and valid WSS. Get Correct fault about WSA -
"Action urn:echo1 not supported"
In this case FaultOutInterceptor line 58:
Throwable cause = f.getCause();
cause is null, which means the getFaultForClass isn't called.
However, if a client sends a request with valid WSA but invalid WSS headers,
getFaultForClass is called and causes a NPE meaning no fault is returned.
Initially the logs shows a SoapFault being thrown with the expected value
"An error was discovered processing the <wsse:Security> header", but
ultimately a NPE is thrown in the FaultOutInterceptor
(org.apache.cxf.interceptor.FaultOutInterceptor.getFaultForClass(FaultOutInterceptor.java:163))
Thanks,
Steve
--
View this message in context:
http://servicemix.396122.n5.nabble.com/CXF-NPE-tp5597929p5597929.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.