title: Set XMLGregorianCalendar value from a Calendar date in Java
body: <p>what is the best way to set a XMLGregorianCalendar value from a Calendar date? </p>
  
  <pre><code>    posting.setXMLGregorianCalendar(message.getCreateDate());
  </code></pre>
  
  <p>here my class:</p>
  
  <pre><code>Message.java
  
  private Calendar createDate;
  public Calendar getCreateDate() {
      return createDate;
  }
  </code></pre>