Jim Ma created CXF-8596:
---------------------------

             Summary: WebFaultOutInterceptor goes into infinite loop when it 
tries to write SoapFaultException with detail
                 Key: CXF-8596
                 URL: https://issues.apache.org/jira/browse/CXF-8596
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.3.11, 3.4.4
            Reporter: Jim Ma
            Assignee: Jim Ma
             Fix For: 3.3.12, 3.4.5, 3.5.0



This happens when :
1.  jaxws service endpoint A  calls another endpoint service B
2. endpoint service B throws SOAPFaultException, and this SOAPFaultException 
wraps a SOAPFault which is constructed with an Exception class like : 

{code:java}
    public String proxyException(String input) throws SOAPFaultException {
        try {
            Integer.parseInt(input);
        } catch (Exception e) {
            throw new SOAPFaultException(
                    createSOAPFault(new EchoException("exception from 
testException()")));
        }
        return "DONE";
    }

    private SOAPFault createSOAPFault(Throwable ex) {
        try {
            SOAPFault soapFault = 
SOAPFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL).createFault();
            soapFault.setFaultCode(new 
QName(SOAPConstants.URI_NS_SOAP_ENVELOPE, "Server", "a"));
            soapFault.setFaultString("SOAPFaultString");
            soapFault.setFaultActor("ServerSide");
            soapFault.addDetail();
            return soapFault;
        } catch (SOAPException e) {
            throw new RuntimeException(e);
        }
    }
{code}





--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to