Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stp-dev] element based annotaion validator is ready to use

Hi David,
 
The element based annotation validator should be ready to use now.
 
Check out the test at org.eclipse.stp.sc.jaxws.validator.AnnotationValidatorTest
 
The input of the validator is NormalAnnotation.
The return type is boolean value. if it returns false. you can call validator.getLastErrorMessage to get the error message string.
 
The schema files for jsr181 are checked in at
/org.eclipse.stp.sc.jaxws/etc/validator/javax_jws.xsd
/org.eclipse.stp.sc.jaxws/etc/validator/javax_jws_soap.xsd
 
The way it works is:
-> build annotaion xml doc from the NormalAnnotation
-> try to find the schema according to namespace defined in the annotation xml.
-> if the schema doesn't exist, the validator will return true.
-> otherwise, validate the xml against it's schema
 
You can put more schema files to the etc/validator/ dir at anytime, thus we can support user to validate any annotation they want.
 
 
Regards
 
Johnson
 
 
 
 
 
 
 
 

Back to the top