I created the JAX-WS web service using JAXB annotations in some request fields to make them mandatory.
@XmlElement(required = true) protected String number;
WSDL generated by cxf-java2ws-plugin is correct, in the fields minOccurs="0" not:
<xs:element name="number" type="xs:string"/>
But when a service receives a request that does not take these restrictions into account (missing fields), SoapFault or exception is not thrown.
I also tried adding @SchemaValidation to my WS class without effect.
How can query verification against schmema be automated (or rather, checking for constraints based on annotations)?
java soap wsdl jax-ws cxf
kgautron
source share