email.setType("Office");
email.setEmailAddress("joseph.doe@mycompany.com");
addr.getEmailDetails().getEmail().add(email);
addr.setPhoneDetails(new PhoneDetailsTypeImpl());
PhoneType phone = new PhoneTypeImpl();
phone.setType("Work");
phone.setPhoneNumber("555.6789");
addr.getPhoneDetails().getPhone().add(phone);
phone = new PhoneTypeImpl();
phone.setType("Fax");
phone.setPhoneNumber("555.1212");
addr.getPhoneDetails().getPhone().add(phone);
// And save it into the file "Address.xml"
JAXBContext context = JAXBContext.newInstance("org.apache.ws.jaxme.test.misc.address");
Marshaller marshaller = context.createMarshaller();