Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.1
-
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.