1. Problem Description
After I deployed my CXF web service to testing environment server, when I call one of web service interfaces from client, got this error:
javax.xml.ws.soap.SOAPFaultException: Fault occurred while processing.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
at $Proxy57.getBalance(Unknown Source)
However, when I deployed the same war on my local host, everything goes well.
2. Analysis
I googled a lot and tried different means, checklist items includes:
(1) CXF version. Both 2.7.10, negative.
(2) Consistency between client stub and server interface. I regenerated client stub with latest WSDL still negative.
(3) Removed WS-Security dependencies and configurations, still negative.
(4) Removed aspects(For catching IllegalArgumentException.), still negative.
(5) Removed array type in response object, still negative.
3. Solution
In my case, the root cause is testing environment Tomcat's data source didn't be set properly, hence during the web service processing, there were some unexpected exceptions occurred. Correct the data source configuration is the cure.