Jan 22nd, 2008, 09:32 AM
New optional elements in schema
I want my webservices to be as 'loosely coupled' as possible, while keeping it programmer-friendly. So I want to generate classes from an XML schema. However, I want to be able to add new optional fields to the schema, without breaking existing services and clients.
Which of the available Object/XML mapping strategies can be configured to ignore unknown elements?
Jan 23rd, 2008, 02:23 AM
Try Jaxb2 without validation. You should omit the schema* property of the org.springframework.oxm.jaxb.Jaxb2Marshaller in configuration, or more generally, the JAXBContext must be instantiated without ValidationHandler.
Also you may want to add org.springframework.ws.endpoint.interceptor.Payloa dValidatingInterceptor to the endpoint mapping instance to validate payloads before/after unmarshalling/marshalling
Jan 30th, 2008, 01:30 AM
Thanks for the answer. I wonder if there are java 1.4 options as well. Anyone?