title: Problem with unmarshaling xsd:base64Binary
body: <p>JAXB generated from XSD base64Binary and hexBinary to byte array. I have xsd element with base64Binary. This is strict and cannot be changed. But in this element we has value of hexBinary (yea a little bit confused). And now where it is problem. I dont dont how is JAXB unmarshaling these element but there is something not sutaible to me. So if there could be hexBinary  in my element it unmarshaling right. But im my case element has type base64Binary and JAXB unmarshaling these element something else what is wrong to me. Is there a way to change how JAXB handle with these element and tell him to handle as these element would be hexBinary.
  maybe confusing question but I need help with these.</p>
  
  <p>so in shortly way I have element base64Binary  but I wanna to tell JAXB to unmarshaling as these will be hexBinary </p>
  
  <p>I read something that I have to create new XmlAdapter but I dont know where should I use it because I have just classes which generated JAXB</p>
  
  <p>UPDATE:</p>
  
  <p>I found where is a problem. when element is base64Binary  in generated class it created this</p>
  
  <pre><code>XmlElement(name="name") protected byte[] element
  </code></pre>
  
  <p>but when it is hexBinary it create </p>
  
  <pre><code>XmlJavaTypeAdapter(HexBinaryAdapter.class) XmlElement(name="name") protected byte[] element
  </code></pre>
  
  <p>so now I need to know how to say jaxb to use these adapter when I have base64Binary<br>
  protected byte[] element</p>