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

Allow for custom ErrorHandler in PayloadValidatingInterceptor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 2.0.1
    • Component/s: Core, OXM, XML
    • Labels:
      None

      Description

      Validating a SOAP request or response with PayloadValidatingInterceptor or Jaxb2Marshaller fails when using MTOM.

      The spring-ws MTOM sample fails when PayloadValidatingInterceptor is added to the endpoint interceptor chain.

      Schema:
      <element name="SendRequest" type="tns:SendMessage"/>

      <complexType name="SendMessage">
      <sequence>
      <element name="sender" type="string"/>
      <element name="recipient" type="string"/>
      <element name="content" type="base64Binary" xmime:expectedContentTypes="/"/>
      </sequence>
      </complexType>

      SOAP request:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mail="http://www.enovation.nl/ems/mailwebservice">
      <soapenv:Header/>
      <soapenv:Body>
      <mail:SendRequest>
      <mail:sender>1</mail:sender>
      <mail:recipient>2</mail:recipient>
      <mail:content><inc:Include xmlns:inc="http://www.w3.org/2004/08/xop/include" href="cid:768176637073"/></mail:content>
      </mail:SendRequest>
      </soapenv:Body>
      </soapenv:Envelope>

      SOAP response:
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Client</faultcode>
      <faultstring xml:lang="en">Validation error</faultstring>
      <detail>
      <spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-type.3.1.2: Element 'mail:content' is a simple type, so it must have no element information item [children].</spring-ws:ValidationError>
      </detail>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

        Activity

        avthart Albert van 't Hart created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Resolved [ 5 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Won't Fix [ 2 ]
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 2.0.1 [ 11810 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Reopened [ 4 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Summary Validating with PayloadValidatingInterceptor or Jaxb2Marshaller fails when using MTOM attachments Allow for custom ErrorHandler in PayloadValidatingInterceptor
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 44m [ 2640 ]
        Remaining Estimate 0d [ 0 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            avthart Albert van 't Hart
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 44m
              44m