return marshalOutput;
}
private Marshaller createMarshaler(final File marshalOutput) throws Exception {
getXMLContext().getInternalContext().getXMLClassDescriptorResolver().cleanDescriptorCache();
Marshaller marshaller = getXMLContext().createMarshaller();
marshaller.setWriter(new FileWriter(marshalOutput));
//-- Configuration for marshaler? Use config from unit test case if available
Configuration config = _unitTest.getConfiguration();
if (config == null) {
config = _configuration;
}
if (config != null) {
ConfigurationType marshal = config.getMarshal();
List returnValues = invokeEnumeratedMethods(marshaller, marshal);
returnValues.clear(); // We don't care about the return values
}//-- config != null
if (_mapping != null) {
marshaller.setMapping(_mapping);
}
if (_listener != null && _listener instanceof MarshalListener
&& _listenerType != TypeType.UNMARSHAL) {
marshaller.setMarshalListener((MarshalListener)_listener);
}
return marshaller;
}