title: Handling invalid enum values while doing JAXB Unmarshalling
body: <p>My Jaxb has created a Enum class based on the XML schema set up. </p>
  
  <pre><code>**enum Fruit {
      APPLE,ORANGE;
  }**
  </code></pre>
  
  <p>I am using a SOAP UI to check my web service. Since it is a free form entry, if i give a wrong fruit say <strong>"Guva"</strong> then instead of throwing an exception it is returning it as null after doing the UnMarshalling.</p>
  
  <p>How can i avoid this? Should i use custom enum class instead of JAXB generated one. Please give some example. i.e. <strong></strong></p>
  
  <p>regards
  sri</p>