ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
attr.setName(aname);
// Check if this is mapped to a Element
if(mappedType != null && mappedType.equals(Element.class))
{
attributeValue = new ServiceElementValueMetaData();
}
else if(plainValue != null)
{
// Create a text value
String textValue = String.valueOf(plainValue);