[
https://issues.apache.org/jira/browse/CXF-7990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807713#comment-16807713
]
Colm O hEigeartaigh edited comment on CXF-7990 at 4/2/19 12:29 PM:
-------------------------------------------------------------------
[~ema] - Could you prepare a PR so that I can easily check it? BTW the
interface in the test is not used from what I can see.
was (Author: coheigea):
[~ema] - Could you prepare a PR so that I can easily check it?
> 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
>
>
> 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)