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

SaajSoap11Body.getFault() does not conforms to interface specification - if no fault is present IllegalArgumentException is thrown instead of returning null.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6
    • Fix Version/s: 1.5.7
    • Component/s: None
    • Labels:
      None

      Description

      Hi,

      the call

      SoapFault bodyFault = body == null ? null : body.getFault();

      returns following exception (line numbers are from Spring-WS 1.5.1, but relevant code is the same in 1.5.6 as well).

      java.lang.IllegalArgumentException: element must not be null
      at org.springframework.util.Assert.notNull(Assert.java:112)
      at org.springframework.ws.soap.saaj.SaajSoapElement.<init>(SaajSoapElement.java:40)
      at org.springframework.ws.soap.saaj.SaajSoapFault.<init>(SaajSoapFault.java:36)
      at org.springframework.ws.soap.saaj.SaajSoap11Fault.<init>(SaajSoap11Fault.java:34)
      at org.springframework.ws.soap.saaj.SaajSoap11Body.getFault(SaajSoap11Body.java:45)
      at com.navteq.ncs.common.core.utils.aop.EndpointInvokeInterceptor.checkResult(EndpointInvokeInterceptor.java:46)

      while SoapBody interface Javadoc states for this method:
      Returns:
      the SoapFault, or null if none is present

      The getFault() method in the class SaajSoap11Body may be modified as follows

      public SoapFault getFault()

      { SOAPFault fault = getImplementation().getFault(getSaajBody()); return fault==null ? null : new SaajSoap11Fault(fault); }

        Activity

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            al0 Oleksandr Alesinskyy
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: