Disable validation for jaxb 1 marshaller -


how disable validation on marshaller jaxb1?

you set validationeventhandler on marshaller ignored events:

marshaller.seteventhandler(new ignoringvalidationeventhandler()); 

the validationeventhandler like:

import javax.xml.bind.validationevent; import javax.xml.bind.validationeventhandler;  public class ignoringvalidationeventhandler implements validationeventhandler {      public boolean handleevent(validationevent event) {         return true;     }  } 

note: if new application recommend using jaxb 2 (jsr-222) instead of jaxb 1.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -