I have java code generated by apache CXF wsdl2java tool. I turn on schema validation by setting:
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
In .wsdl file I have those kind of elements:
<s:element minOccurs="1" maxOccurs="1" nillable="false" name="propertyName" type="s:string"/>
They are mappnig on:
@XmlElement(name = "ServiceSeq", required = true, nillable = false)
protected String propertyName;
But when I am sending XML containing:
<abc:propertyName></abc:propertyName>
It pass the validation, and mapped is empty string. I do not want there empty string. I want those kind of request not to passing validation. Is JAX-WS provide those kind of validation? If yes - then how to turn it on? If not - what is the best way to write my own code that will reject those kind of request?