Verify JAX-WS and XSD

I have wsdl that has imported xsd, this xsd has limitations like this:

<xsd:simpleType name="len_type"> <xsd:restriction base="xsd:string"> <xsd:pattern value='[:alnum:]{4} [\d]{2} [\d] [\d]{2}' /> </xsd:restriction> </xsd:simpleType> 

Thus, I would like if I used this ear for glass fish through netbeans so that a check was made on the data that was transmitted, but this is not so. Are there any calls I need to make to make sure the data is verified before it is passed to my @WebService object and turned into a Java object.

+1
source share
1 answer

Use the SchemaValidation annotation.

Be warned that it only works for document / literal style web services. And be careful with checking the schema if you are using XSD import .

+3
source

Source: https://habr.com/ru/post/902301/


All Articles