You may need to write your own javax.xml.bind.ValidationEventHandler and set the in via the "jaxb-reader-validation-event-handler” property. Not sure how complex that might be.
Dan > On Sep 23, 2016, at 4:30 AM, Matthias Rudingsdorfer > <[email protected]> wrote: > > Hi Dan, > > Thank you. I found this solution in the web, too, and it works perfectly. > But now the error is just ignored. Can I see somewhere whether the error > occurred? So that i can send me an email? > > Matthew > > Gesendet mit AquaMail für Android > http://www.aqua-mail.com <http://www.aqua-mail.com/> > I believe if you set the property: > > "set-jaxb-validation-event-handler” > > to false, we wouldn’t install the event handler that generates this error and > any unknown things just get ignored. > > Dan > > > >> On Sep 23, 2016, at 3:18 AM, MRneedHelp <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi, >> >> now that I have cxf working, i tried to play around with it a bit. I got the >> following exception, when I deleted one attribute of my response class from >> server: >> >> Unmarshalling Error: unexpected element (URI:"", lokal:"Uname"). expected >> elements are >> <{}Vorna>, <{}Street>,<{}KostlTxt>,<{}Gbdat>,<{}Kostl>,<{}Mobil>, .... etc. >> >> I know, this exception comes from the fact, that I deleted the attribute >> "uname" from my class. I did this, because I wanted to know, what happens, >> when the SAP server ( to which I connect and request some personal >> information) put a new attribute to its response, like a room number or what >> ever. >> >> So my question is: Is there a way to ignore that extra attribute and dont >> get the "Unmarshalling Error" at runtime, so that my program does not crash? >> I would send me an email, if an attribute is added, so that I can add it >> then to my code, to consider it. >> >> Thank you in advance. >> >> Matthew >> >> >> >> -- >> View this message in context: >> http://cxf.547215.n5.nabble.com/Unmarshalling-Error-unexpected-element-tp5772977.html >> >> <http://cxf.547215.n5.nabble.com/Unmarshalling-Error-unexpected-element-tp5772977.html> >> Sent from the cxf-user mailing list archive at Nabble.com >> <http://nabble.com/>. > > -- > Daniel Kulp > [email protected] <mailto:[email protected]> - http://dankulp.com/blog > <http://dankulp.com/blog> > Talend Community Coder - http://coders.talend.com <http://coders.talend.com/> -- Daniel Kulp [email protected] <mailto:[email protected]> - http://dankulp.com/blog <http://dankulp.com/blog> Talend Community Coder - http://coders.talend.com <http://coders.talend.com/>
