Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3846

NullPointerException when requesting ?wsdl using AegisDatabinding and @SchemaValidation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.1
    • 2.4.4, 2.3.8
    • Aegis Databinding
    • None
    • Debian 6.1 x64, java 1.6.0_18, JBoss 7.0.1

    • Novice

    Description

      After getting schema validation to work with aegis databinding, I noticed the ?wsdl is no longer working due to a NullPointerException. The relevant part of the stacktrace:

      unwinding now: java.lang.NullPointerException
      at org.apache.cxf.wstx_msv_validation.Stax2ValidationUtils.setupValidation(Stax2ValidationUtils.java:71) [cxf-wstx-msv-validation-2.4.1.jar:]
      at org.apache.cxf.wstx_msv_validation.WoodstoxValidationImpl.setupValidation(WoodstoxValidationImpl.java:67) [cxf-wstx-msv-validation-2.4.1.jar:]
      at org.apache.cxf.aegis.databinding.AegisSchemaValidationInInterceptor.setSchemaInMessage(AegisSchemaValidationInInterceptor.java:68) [cxf-rt-databinding-aegis-2.4.1.jar:2.4.1]
      at org.apache.cxf.aegis.databinding.AegisSchemaValidationInInterceptor.handleMessage(AegisSchemaValidationInInterceptor.java:56) [cxf-rt-databinding-aegis-2.4.1.jar:2.4.1]
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.1.jar:2.4.1]

      It seems that at AegisSchemaValidationInInterceptor:54 the result of message.getContent(XMLStreamReader.class) is null.

      Obviously, a ?wsdl from a webbrowser is not a valid message, so a validation error could be expectable (a NPE isn't of course). I am wondering though if it is desirable, as it would leave ?wsdl broken.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            rikvb Rik van Ballegooijen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: