Uploaded image for project: 'ODE'
  1. ODE
  2. ODE-920

Flawed handling of empty SOAP bodies

    XMLWordPrintableJSON

    Details

      Description

      Assumptions:

      • Debug logging is enabled for log4j.category.org.apache.ode.axis2
      • A SOAP request with an empty body is sent to the ODE

      Problem:

      • An error occurs due to trying to access the empty body.

      Reason:

      • The debug output tries to convert that body element to text ("stringify" it).
      • Code Reference: Class org.apache.ode.axis2.ODEService, Line 122
      • Code Excerpt: >>>>>__log.debug("Message content: " + DOMUtils.domToString(odeRequest.getMessage()));<<<<<

      Solution:

      • Check for an empty body.

      Logged Exception: >>>>>>>>
      16:40:13,804 ERROR [ODEService] Exception occured while invoking ODE
      java.lang.IllegalArgumentException: Cannot stringify null Node!
      at org.apache.ode.utils.DOMUtils.domToString(DOMUtils.java:420)
      at org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:122)
      at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69)
      at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:63)
      at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
      at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
      at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)
      <<<<<<<<

      Notes:

      • Most probably also present in earlier versions.

      Sers,
      the contented

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              thecontented Felix Neumann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified