cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-1597) setStackTrace method of org.apache.cxf.interceptor.ClientFaultConverter make me can't put stackTrace elment under fault detail element
Date Tue, 20 May 2008 19:37:55 GMT

     [ https://issues.apache.org/jira/browse/CXF-1597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-1597.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.7
         Assignee: Daniel Kulp

> setStackTrace method of org.apache.cxf.interceptor.ClientFaultConverter make me can't
put stackTrace elment under fault detail element
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-1597
>                 URL: https://issues.apache.org/jira/browse/CXF-1597
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.1.1
>            Reporter: hwavelet
>            Assignee: Daniel Kulp
>             Fix For: 2.1.1, 2.0.7
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> i think method setStackTrace may need have a change like this to make it more compatible
with other databinding:
>  private void setStackTrace(Fault fault, Message msg) {
>         Map<String, String> ns = new HashMap<String, String>();
>         XPathUtils xu = new XPathUtils(ns);
>         String ss = (String) xu.getValue("/" + Fault.STACKTRACE + "/text()", fault.getDetail(),
//changed
>                 XPathConstants.STRING);
>         List<StackTraceElement> stackTraceList = new ArrayList<StackTraceElement>();
>         if (!StringUtils.isEmpty(ss)) {
>             StringTokenizer st = new StringTokenizer(ss, "\n");
>             while (st.hasMoreTokens()) {
>                 String oneLine = st.nextToken();
>                 StringTokenizer stInner = new StringTokenizer(oneLine, "!");
>                 if(stInner.countTokens() == 4) {
>                   StackTraceElement ste = new StackTraceElement(stInner.nextToken(),
stInner.nextToken(),
>                           stInner.nextToken(), Integer.parseInt(stInner.nextToken()));
>                   stackTraceList.add(ste);
>               } else {
>                   break;
>               }
>             }
>             if (stackTraceList.size() > 0) {
>                 StackTraceElement[] stackTraceElement = new StackTraceElement[stackTraceList.size()];
>                 Exception e = msg.getContent(Exception.class);
>                 e.setStackTrace(stackTraceList.toArray(stackTraceElement));
>             }
>         }
>     }
> if changed like so, we can put arbitrary stackTrace element under fault detail instead
of the specified xml format

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message