}
//create mappings for each field.
Iterator<XMLField> fields = getFieldToClassMappings().keySet().iterator();
while (fields.hasNext()) {
XMLField next = fields.next();
Converter converter = null;
if(fieldsToConverters != null) {
converter = fieldsToConverters.get(next);
}
if (next.getLastXPathFragment().nameIsText()) {
//if it's a simple value, create a Direct Mapping
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeName(this.getAttributeName());
xmlMapping.setAttributeAccessor(this.getAttributeAccessor());
xmlMapping.setAttributeElementClass(getFieldToClassMappings().get(next));
XMLConversionManager xmlConversionManager = (XMLConversionManager) session.getDatasourcePlatform().getConversionManager();
QName schemaType = (QName)xmlConversionManager.getDefaultJavaTypes().get(xmlMapping.getAttributeElementClass());
if(schemaType != null) {
next.setSchemaType(schemaType);
}
xmlMapping.setField(next);
xmlMapping.setDescriptor(this.getDescriptor());
xmlMapping.setContainerPolicy(getContainerPolicy());
if(converter != null) {