Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-142

AxiomSoapFaultDetailElementIterator does not consider whitespace nodes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 RC2
    • Fix Version/s: 1.0
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Axiom 1.2.4

      Description

      The org.springframework.ws.soap.axiom.AxiomSoapFaultDetail$AxiomFaultDetailElementIterator throws a ClassCastException if the Fault Detail element contains whitespace nodes, e.g. line breaks (\n). This seems to be due to the fact that the next() method casts everything to OMElement and does not consider OMTextImpl nodes (which represent whitespace).

      1. AxiomSoapFaultDetail.java
        3 kB
        Kai Hudalla
      2. AxiomSoapFaultDetailTest.java
        4 kB
        Kai Hudalla

        Activity

        Hide
        hudalla Kai Hudalla added a comment -

        JUnit test case for demonstrating the problem

        Show
        hudalla Kai Hudalla added a comment - JUnit test case for demonstrating the problem
        Hide
        hudalla Kai Hudalla added a comment -

        I think the AxiomSoapFaultDetail.getDetailEntries() method should simply return getAxiomFaultDetail().getChildElements() instead of instantiating an AxiomSoapFaultDetailElementIterator for getAxiomFaultDetail().getAllDetailEntries() (which seems to return all child nodes, not only the child elements)

        Show
        hudalla Kai Hudalla added a comment - I think the AxiomSoapFaultDetail.getDetailEntries() method should simply return getAxiomFaultDetail().getChildElements() instead of instantiating an AxiomSoapFaultDetailElementIterator for getAxiomFaultDetail().getAllDetailEntries() (which seems to return all child nodes, not only the child elements)
        Hide
        hudalla Kai Hudalla added a comment -

        The getDetailEntries() method has been changed in order to fix the problem. With this fix the test case succeeds as well. Maybe you can integrate it into the next release.

        Show
        hudalla Kai Hudalla added a comment - The getDetailEntries() method has been changed in order to fix the problem. With this fix the test case succeeds as well. Maybe you can integrate it into the next release.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Fixed, thanks for the patch and the test!

        Show
        arjen.poutsma Arjen Poutsma added a comment - Fixed, thanks for the patch and the test!
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing issues for 1.0.0

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.0.0

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            hudalla Kai Hudalla
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: