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

Stacktrace in response instead of soap fault

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.5.9
    • Fix Version/s: 2.0.4
    • Component/s: Core
    • Labels:
      None

      Description

      The webservice responds with a stacktrace instead of a soap fault if malformed xml is sent.

        Issue Links

          Activity

          Hide
          walnutmon Justin Boyd added a comment -

          We currently have SOAP services in production that still provide a stack-trace when malformed XML is sent to them - this is a very difficult bug to deal with and there is currently no work-around

          Show
          walnutmon Justin Boyd added a comment - We currently have SOAP services in production that still provide a stack-trace when malformed XML is sent to them - this is a very difficult bug to deal with and there is currently no work-around
          Hide
          johntylerbush john bush added a comment -

          This ruined a better part of my day. The endpoint resolvers are pretty useless. This really needs to be fixed. I had to extend the servlet to get around this, feels totally hacky, but can't sort out any other way.

          Show
          johntylerbush john bush added a comment - This ruined a better part of my day. The endpoint resolvers are pretty useless. This really needs to be fixed. I had to extend the servlet to get around this, feels totally hacky, but can't sort out any other way.
          Hide
          tedpennings Ted Pennings added a comment -

          John, not sure if it's too late to help, but you could create a servlet filter and wrap the chain.doFilter() method in a try-catch block for NestedServletException. You can look at the cause to see if it's an invalid XML related issue, and take action that way. It's slightly better than having to extend the MessageDispatcherServlet, but really not by much. It would be nice to see this issue resolved.

          Show
          tedpennings Ted Pennings added a comment - John, not sure if it's too late to help, but you could create a servlet filter and wrap the chain.doFilter() method in a try-catch block for NestedServletException. You can look at the cause to see if it's an invalid XML related issue, and take action that way. It's slightly better than having to extend the MessageDispatcherServlet, but really not by much. It would be nice to see this issue resolved.
          Hide
          slsh Jarkko Rantavuori added a comment -

          What I have done is to define a custom MessageReceiverHandlerAdapter that is used by the default spring-ws MessageDispatcherServlet. That works and I think is the way to handle this by design. I can provide the code if needed.

          Show
          slsh Jarkko Rantavuori added a comment - What I have done is to define a custom MessageReceiverHandlerAdapter that is used by the default spring-ws MessageDispatcherServlet. That works and I think is the way to handle this by design. I can provide the code if needed.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          As of version, Spring-WS throws a InvalidXmlException when dealing with invalid XML. By default, this exception results in a 400 status code, but it can be changed by overriding WebServiceMessageReceiverHandlerAdapter.handleInvalidXmlException,

          Show
          arjen.poutsma Arjen Poutsma added a comment - As of version, Spring-WS throws a InvalidXmlException when dealing with invalid XML. By default, this exception results in a 400 status code, but it can be changed by overriding WebServiceMessageReceiverHandlerAdapter.handleInvalidXmlException,

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              sylvestris Martin Flower
            • Votes:
              6 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: