Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3934

JaxWsClientProxy clears stacktrace of custom exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.1
    • 2.3.8, 2.4.5, 2.5.1
    • JAX-WS Runtime
    • None
    • AS Jboss 5.1, jbossws-cxf-3.4.1, cxf-2.3.1

    • Unknown

    Description

      Web service method throws custom exception annotated by @WebFault, cxf endpoint configuration has faultStackTraceEnabled=true and exceptionMessageCauseEnabled=true properties. On client side we have response with filled stacktrace element in fault/detail then through InFaultInterceptors new instance of our custom exception is created and filled with stacktrace from response. Our custom exception with stacktrace is intercepted in JaxWsClientProxy when its stacktrace is filled again using fillInStackTrace() as a result we have empty stacktrace.

      line 120 ..try {
      if (isAsync)

      { result = invokeAsync(method, oi, params); }

      else

      { result = invokeSync(method, oi, params); }

      } catch (WebServiceException wex)

      { throw wex.fillInStackTrace(); }

      catch (Exception ex) {
      for (Class<?> excls : method.getExceptionTypes()) {
      if (excls.isInstance(ex))

      { throw ex.fillInStackTrace(); }

      }
      }
      ...

      I doubt if this behavior according to custom exceptions is correct because I need this server stacktrace on client. Same code exists in cxf 2.5 too.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            azago85 Anton Zagorulko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: