//add attributes
CatalogFactory factory = catalog.getFactory();
SimpleFeatureType schema = featureSource.getSchema();
for (AttributeDescriptor ad : schema.getAttributeDescriptors()) {
AttributeTypeInfo att = factory.createAttribute();
att.setName(ad.getLocalName());
att.setBinding(ad.getType().getBinding());
featureType.getAttributes().add(att);
}