You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/09 06:52:00 UTC

[jira] [Work logged] (CXF-7990) CXF goes in Infinite loop when service endpoint throws SOAPFaultException

     [ https://issues.apache.org/jira/browse/CXF-7990?focusedWorklogId=224791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-224791 ]

ASF GitHub Bot logged work on CXF-7990:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Apr/19 06:51
            Start Date: 09/Apr/19 06:51
    Worklog Time Spent: 10m 
      Work Description: jimma commented on pull request #538: [CXF-7990]:Fix Infinite loop when service endpoint throws SOAPFaultEx…
URL: https://github.com/apache/cxf/pull/538
 
 
   …ception
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 224791)
            Time Spent: 10m
    Remaining Estimate: 0h

> CXF goes in Infinite loop when service endpoint throws SOAPFaultException
> -------------------------------------------------------------------------
>
>                 Key: CXF-7990
>                 URL: https://issues.apache.org/jira/browse/CXF-7990
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.2.8, 3.3.1
>            Reporter: Jim Ma
>            Assignee: Jim Ma
>            Priority: Major
>             Fix For: 3.4.0, 3.2.9, 3.3.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> CXF will stuck in a infinite loop when add a detail element in SoapFault of SOAPFaultException:
> @WebService(name = "MyEchoService", targetNamespace = "urn:echo")
> @Logging
> public class MyEchoService {
>     @WebMethod
>     public String echoException(String input) throws SOAPFaultException {
>                     SOAPFaultException ex;
>                     try {
>                             ex = wrapToSoapFault(new Exception("hello"));
>                     } catch (Exception e) {
>                             // TODO Auto-generated catch block
>                             return e.toString();
>                     }
>                     throw ex;
>     }
>   private SOAPFaultException wrapToSoapFault(Exception ex) throws Exception {
>             SOAPFactory fac = null;
>             try {
>                     fac = SOAPFactory.newInstance();
>                     String message = ex.getMessage();
>                     SOAPFault sf = fac.createFault(message, new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Client"));
>                     sf.setFaultString("ERROR");
>                     //Add detail gets cxf goes into infinite loop
>                     sf.addDetail().setAttribute("message", message);
>                     return new SOAPFaultException(sf);
>             } catch (Exception e2) {
>                     throw e2;
>             }
>     }
> }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)