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

AbstractSoapMessage.getPayloadSource returns null with Axis SAAJ

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M3
    • Fix Version/s: 1.0 RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      java 1.4
      axis 1.4

      Description

      Hi,

      I have some more woes with Axis SAAJ. This problem doesn't occur with jdk1.5 and Sun's SAAJ implementation, so it may well be the result of an axis bug.

      The payload logging interceptor isn't logging responses for me, but requests get logged fine. It turns out that getPayloadSource() was returning null.

      I traced it through to getFirstBodyElement(SOAPBody) in Saaj12Implementation:

      public SOAPBodyElement getFirstBodyElement(SOAPBody body) {
      for (Iterator iterator = body.getChildElements(); iterator.hasNext() {
      Object child = iterator.next();
      if (child instanceof SOAPBodyElement)

      { return (SOAPBodyElement) child; }

      }
      return null;
      }

      The child it found was actually an instance of SOAPElement, not SOAPBodyElement.

      body.getClass()
      (java.lang.Class<T>) class org.apache.axis.message.SOAPBody
      child.getClass()
      (java.lang.Class<T>) class org.apache.axis.message.MessageElement

      public class org.apache.axis.message.MessageElement extends org.apache.axis.message.NodeImpl implements javax.xml.soap.SOAPElement, (etc)

      The javadoc for SOAPBody certainly implies that it should be a SOAPBodyElement, but it doesn't look as if SOAPBodyElement adds anything over SOAPElement so perhaps it can check for and return that instead?

      Thanks,
      Brad.

        Attachments

          Activity

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              bradh Brad Harvey
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: