Experimenting with the transformation feature [1], 2.4.0-SNAPSHOT only, may also be of interest. Using this feature may allow for a more selective configuration, allowing for some elements which do not have to understood, be ignored, while still having the validation on...
Sergey [1] http://cxf.apache.org/docs/transformationfeature.html On Mon, Mar 28, 2011 at 8:06 PM, Daniel Kulp <[email protected]> wrote: > > > You can set: > > "set-jaxb-validation-event-handler" to "false" > > as an endpoint/request property. That should cause it to ignore the > unknown elements again. > > Dan > > > > On Monday 28 March 2011 2:57:46 PM Jeremy Robertson wrote: > > Is there a way to configure a CXF service to ignore the > > javax.xml.bind.UnmarshalException "unexpected element"? > > > > The desired functionality is that when the unmarshaller hits an element > > that it does not understand, it ignores it and moves on, rather than > > throwing the above exception. > > > > We generate both services and clients, and in previous versions of CXF (I > > think pre 2.3), elements that were not understood were ignored. This > > allowed us to extend data objects in the service without having to > rebuild > > clients in legacy systems. Having upgraded a project to 2.3.1, I am now > > getting the unexpected element error (I'm not entirely sure what other > > dependencies were also upgraded, so it may be separate from CXF, in which > > case, sorry to bother). > > > > Is there a property I can set on the JAXBDataBinding class that will > affect > > this? Is there somewhere online I should be looking (I've tried, but > > haven't found much yet)? > > > > Thanks for your time, > > Jeremy > > > > > > NOTICE: This email message is for the sole use of the intended > > recipient(s) and may contain confidential and privileged information. Any > > unauthorized review, use, disclosure or distribution is prohibited. If > you > > are not the intended recipient, please contact the sender by reply email > > and destroy all copies of the original message. > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > Talend - http://www.talend.com >
