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

PayloadValidatingInterceptor not working under WebSphere 6.0.2.11

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0 M2
    • Fix Version/s: 1.0 M3
    • Component/s: XML
    • Labels:
      None
    • Environment:
      WebSphere 6.0.2.11

      Description

      From the forum:

      I had problems with using PayloadValidatingInterceptor with WebSphere 6.0.2.11. Only first request validation was successful while all other subsequent ones were causing errors in SaxParser.

      I managed to solve problem with combination of replacing and extending XmlValidatorFactory, Jaxp10ValidatorFactory, Jaxp10Validator and PayloadValidatingInterceptor but it is not a very clean solution because field validator in class PayloadValidatingInterceptor is private field with no setter.

      Problems were happening in handleRequest method in AbstractValidatingInterceptor class in line:
      SAXParseException[] errors = validator.validate(requestSource);

      SaxParser was trying to read same InputStream each time and after first time reading it (reading of xml schema) it was not able to read it any more.

      Classes I had to change are in zipped attachment.

      P.S.
      I had similar problems with CastorMarshaller class but I just replaced it with current one from svn repository (with small changes) and it was easily solved.

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          This seems to be specific to WebSphere 6.0. I cannot reproduce it in 6.1

          Show
          arjen.poutsma Arjen Poutsma added a comment - This seems to be specific to WebSphere 6.0. I cannot reproduce it in 6.1
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          This issue only occurs on WebSphere 6.0, not on 6.1. Also, as indicated in #SWS-63, upgrading Xerces also helps.

          Show
          arjen.poutsma Arjen Poutsma added a comment - This issue only occurs on WebSphere 6.0, not on 6.1. Also, as indicated in # SWS-63 , upgrading Xerces also helps.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: