I’m developing a SOAP application using JAX-WS and JAXB. I’d like to specify a pattern constraint for one of the fields (a Dutch postcode, \d{4}[A-Z]{2}). That’s very easy to do using xsd:pattern, but I can’t find the equivalent JAXB annotation. How do I achieve this?
I’m developing a SOAP application using JAX-WS and JAXB. I’d like to specify a
Share
You can’t. The idea is to use JAXB annotations in combination with runtime validation against the schema, using
javax.xml.validation.Schema, which can be plugged into theMarshallerandUnmarshaller.