We are using a web service which throws 3 types of custom web service faults i.e. ServiceException, ConnectionException and InvalidDataException.
Along with these catch blocks, we have also put in the catch block for RemoteAccessException which is the spring's runtime exception.
catch (org.springframework.remoting.RemoteAccessException remoteAccessExc) {
}
While testing the above listed custom exceptions, we found that all these 3 types of exceptions are not getting catched in their respective catch blocks. Instead all gets catched in the last catch block which is the RemoteAccessException. We found during debugging the exception object of soap fault which is of type org.springframework.remoting.jaxws.JaxWsSoapFaultException that the service is throwing the correct faults.
My concern is why these faults are not falling into their own catch blocks. The service itself tells us to handle these exceptions while placing the service call.
When I hit the service through proxy java client, the faults fall correctly into their respective blocks. If there would have been a problem with POJO's then they shouldn't have worked in this case also. But they are working in this case(when hit through java proxy client) which means no problem in POJOs.
We are using spring-2.5.6.jar.