Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16517

[GSS](7.2.z) CXF-7990 - CXF goes in Infinite loop when service endpoint throws SOAPFaultException

    XMLWordPrintable

Details

    • +
    • Hide

      Use the reproducer attached to the issue.

      There you will find the client and the server source, and also the deployable packages in target directory.

      Deploy the service/target/jaxws-pojo-service.war into your EAP and launch a request with the client (mvn exec:java).

      Show
      Use the reproducer attached to the issue. There you will find the client and the server source, and also the deployable packages in target directory. Deploy the service/target/jaxws-pojo-service.war into your EAP and launch a request with the client (mvn exec:java).

    Description

      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; }

      }
      }

      https://issues.apache.org/jira/projects/CXF/issues/CXF-7990 - CXF goes in Infinite loop when service endpoint throws SOAPFaultException

      Attachments

        Issue Links

          Activity

            People

              rhn-support-ivassile Ilia Vassilev
              aollebla@redhat.com Àngel Ollé Blázquez
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: