Iterator iter = ec.iterator();
int emailarrPos = 0;
while (iter.hasNext()) {
EmailAddress ea = (EmailAddress) iter.next();
Email email = objectFactory.createEmail();
if (ea.getAddress() != null) {
email.setValue(ea.getAddress());
}
// email.setText( ea.getAddress() );
if (ea.getType() != null) {
email.setUseType(ea.getType());
}
emailarr[emailarrPos] = email;
emailarrPos++;
}