Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2212

SAAJInInterceptor creates a SAAJ SOAPFault with only one "Detail" child

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.5, 2.2.1
    • 2.2.2, 2.0.12, 2.1.6
    • Soap Binding
    • None

    Description

      The SAAJInInterceptor creates a SAAJ SOAPFault with only one "Detail" child. For example, if a SOAP Fault is received with:

      <detail><errorcode>3</errorcode><errorstring>This is a fault detail error string</errorstring></detail>

      The following code in SAAJInInterceptor will only add a detail element with a single child element to the SOAPFault object that is created:

      soapFault.addDetail().appendChild(
      soapMessage.getSOAPPart().importNode(
      fault.getDetail().getFirstChild(), true));

      And so the output will be:

      <detail><errorcode>3</errorcode></detail>

      This is clearly a bug, as the SOAP specs allow for multiple detail child elements. Even worse, it doesn't take into account the fact that fault.getDetail() could be of type e.g Node.TEXT, and it could just end up adding a newline character.

      Attachments

        1. cxf_2212.patch
          6 kB
          Colm O hEigeartaigh

        Activity

          People

            dkulp Daniel Kulp
            coheigea Colm O hEigeartaigh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: