0 Replies Latest reply on Nov 18, 2011 9:03 AM by Jacek Dabrowski

    WebService exceptions handling

    Jacek Dabrowski Newbie

      I'm trying to migrate system from using RMI to WebService. JBoss 7.0.2 cxf with spring with WebService auto generation (@WebService).

       

      I've tried to test exception handling by calling WebSerive from standalone client and I can see 2 things depending on the type of exception:

       

      1. unchecked exception:

      exception on console:

       

       Method invocation failed with exception: java.lang.IllegalStateException: ExampleIllegalStateExceptionString: javax.ejb.EJBException: java.lang.IllegalStateException: ExampleIllegalStateExceptionString
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:160) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:213) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:115) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:68) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.webservices.invocation.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:130) [jboss-as-webservices-server-integration-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:169) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:117) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.1.jar:2.4.1]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_22]
          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_22]
          at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:162) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:138) [jbossws-spi-2.0.0.Beta7.jar:2.0.0.Beta7]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480)
          at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
      Caused by: java.lang.IllegalStateException: ExampleIllegalStateExceptionString
      ...
      

       

      and the client gets:

       

       

      Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
          at $Proxy37.test(Unknown Source)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at <package>.DelegateProxy.invoke(DelegateProxy.java:89)
          at $Proxy37.test(Unknown Source)
          at <package>.TestModuleDelegateImpl.test(TestModuleDelegateImpl.java:53)
          at <package>.Main.main(Main.java:29)
      Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at <package>.WsServiceProxy.invoke(WsServiceProxy.java:42)
          ... 9 more
      Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.IllegalStateException: Dupa
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
          at $Proxy37.test(Unknown Source)
          ... 14 more
      Caused by: org.apache.cxf.binding.soap.SoapFault: java.lang.IllegalStateException: ExampleIllegalStateExceptionString
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:104)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
          at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
          at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
          at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
          ... 15 more
      

       

      2. checked exception (with 'throws' declaration):

      I can see this exception declaration in wsdl

       

      <wsdl:fault name="FileNotFoundException">
           <soap:fault name="FileNotFoundException" use="literal"/>
      </wsdl:fault>
      

       

      exception on console:

       

      13:55:52,763 ERROR [org.jboss.as.webservices.invocation.InvocationHandlerEJB3] (http--127.0.0.1-8080-1) Method invocation failed with exception: ExampleFileNotFoundExceptionString: java.io.FileNotFoundException: ExampleFileNotFoundExceptionString
          at <package>.TestModuleBean.test2(TestModuleBean.java:82) [test-module.jar:]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
          at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:45)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ee.component.ViewDescription$ComponentDispatcherInterceptor.processInvocation(ViewDescription.java:202)
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.component.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:58) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor$CustomSessionInvocationContext.proceed(SessionInvocationContextInterceptor.java:126) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:211) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:115) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:68) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
          at org.jboss.as.webservices.invocation.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:130) [jboss-as-webservices-server-integration-7.0.2.Final.jar:7.0.2.Final]
          at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:169) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:117) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.1.jar:2.4.1]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_22]
          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_22]
          at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118) [cxf-rt-core-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:162) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) [cxf-rt-transports-http-2.4.1.jar:2.4.1]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135) [jbossws-cxf-server-4.0.0.Beta3.jar:4.0.0.Beta3]
          at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:138) [jbossws-spi-2.0.0.Beta7.jar:2.0.0.Beta7]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480)
          at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
      

       

      and the client gets:

       

      Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
          at $Proxy37.test2(Unknown Source)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at <package>.DelegateProxy.invoke(DelegateProxy.java:89)
          at $Proxy37.test2(Unknown Source)
          at <package>.TestModuleDelegateImpl.test2(TestModuleDelegateImpl.java:63)
          at <package>.Main.main(Main.java:37)
      Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          ... 9 more
      Caused by: javax.xml.ws.soap.SOAPFaultException: ExampleFileNotFoundExceptionString
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
          at $Proxy37.test2(Unknown Source)
          ... 14 more
      Caused by: org.apache.cxf.binding.soap.SoapFault: ExampleFileNotFoundExceptionString
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
          at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:104)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
          at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:762)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1582)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)
          at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
          at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
          at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
          at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343)
          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295)
          at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
          ... 15 more
      

       

       

      I have to admit that I don't know much about exception handling.

       

      In perfect situation I would like to get real exception like in RMI - no wrappers etc.

       

      If it's not possible I would like (at least) to know what was the exception (class and message if exists) on server side (in unchecked exception I got this information, but in checked exception example there is no info of root exception).