XSDAttributeDeclaration attribute = xsdFactory.createXSDAttributeDeclaration();
attribute.setName(aProperty.getName());
XSDAttributeUse orderDateAttributeUse = xsdFactory.createXSDAttributeUse();
orderDateAttributeUse.setContent(attribute);
complexType.getAttributeContents().add(orderDateAttributeUse);
attribute.updateElement();
if ( aProperty.getType().isDataType() )
{
attribute.setTypeDefinition((XSDSimpleTypeDefinition)typeTable.getXSDTypeDef(attributeSchemaType.getNamespaceURI(),
attributeSchemaType.getLocalPart()));