title: when does JAXB unmarshaller.unmarshal returns a JAXBElement<MySchemaObject> or a MySchemaObject?
body: <p>I have two codes, in two different java projects, doing almost the same thing, (unmarshalling the input of a webservice according to an xsd-file).</p>
  
  <p>But in one case I should write this: (Input is a placeholder name) ( element is OMElement input )</p>
  
  <pre><code>ClassLoader clInput = input.ObjectFactory.class.getClassLoader();
  JAXBContext jc = JAXBContext.newInstance("input", clInput);
  Unmarshaller unmarshaller = jc.createUnmarshaller();
  Input input = (Input)unmarshaller.unmarshal( element.getXMLStreamReader() );
  </code></pre>
  
  <p>and in the other lib I must use JAXBElement.getValue(), because it is a JAXBElement that is returned, and a simple (Input) cast simply crashes:</p>
  
  <pre><code>Input input = (Input)unmarshaller.unmarshal( element.getXMLStreamReader() ).getValue();
  </code></pre>
  
  <p>Do you know what leads to such a difference ?</p>