title: JAX-RS + JAXB (XML) -- How to pass single byte as hexadecimal?
body: <p>To pass a byte array as hexadecimal we can use:</p>
  
  <pre><code>@XmlElement
  @XmlJavaTypeAdapter(HexBinaryAdapter.class)
  private byte[] data;
  </code></pre>
  
  <p>How can we transfer a single byte formatted as hexadecimal? With the following code it does not work. When I try to read it like this I get: <code>HTTP Status 500 - Internal Server Error</code>.</p>
  
  <pre><code>@XmlAttribute
  @XmlJavaTypeAdapter(HexBinaryAdapter.class)
  private byte id;
  </code></pre>