Package org.apache.ws.jaxme.test.misc.address.impl

Examples of org.apache.ws.jaxme.test.misc.address.impl.AddressImpl



public class AddressCreator {
  public static void writeAddress(Writer pWriter) throws JAXBException {
    // Create the element:
    Address addr = new AddressImpl();
    addr.setName(new NameTypeImpl());
    addr.getName().setFirst("Jane");
    addr.getName().setLast("Doe");
    addr.setPostal(new PostalTypeImpl());
    addr.getPostal().setStreet("34 Main Street");
    addr.getPostal().setCity("Boston");
    addr.getPostal().setState("MA");
    addr.getPostal().setZIP("02215");
    addr.setEmailDetails(new EmailDetailsTypeImpl());

    EmailType email = new EmailTypeImpl();
    email.setType("Private");
    email.setEmailAddress("jdoe@yourcompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    email.setType("Office");
    email.setEmailAddress("josephdoe@mycompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    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();
    marshaller.marshal(addr, pWriter);
View Full Code Here



public class AddressCreator {
  public static void writeAddress(Writer pWriter) throws JAXBException {
    // Create the element:
    Address addr = new AddressImpl();
    addr.setName(new NameTypeImpl());
    addr.getName().setFirst("Jane");
    addr.getName().setLast("Doe");
    addr.setPostal(new PostalTypeImpl());
    addr.getPostal().setStreet("34 Main Street");
    addr.getPostal().setCity("Boston");
    addr.getPostal().setState("MA");
    addr.getPostal().setZIP("02215");
    addr.setEmailDetails(new EmailDetailsTypeImpl());

    EmailType email = new EmailTypeImpl();
    email.setType("Private");
    email.setEmailAddress("jdoe@yourcompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    email.setType("Office");
    email.setEmailAddress("josephdoe@mycompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    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();
    marshaller.marshal(addr, pWriter);
View Full Code Here


public class AddressCreator {
  public static void writeAddress(Writer pWriter) throws JAXBException {
    // Create the element:
    Address addr = new AddressImpl();
    addr.setName(new NameTypeImpl());
    addr.getName().setFirst("Jane");
    addr.getName().setLast("Doe");
    addr.setPostal(new PostalTypeImpl());
    addr.getPostal().setStreet("34 Main Street");
    addr.getPostal().setCity("Boston");
    addr.getPostal().setState("MA");
    addr.getPostal().setZIP("02215");
    addr.setEmailDetails(new EmailDetailsTypeImpl());

    EmailType email = new EmailTypeImpl();
    email.setType("Private");
    email.setEmailAddress("jdoe@yourcompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    email.setType("Office");
    email.setEmailAddress("josephdoe@mycompany.com");
    addr.getEmailDetails().getEmail().add(email);
    email = new EmailTypeImpl();
    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();
    marshaller.setProperty(JMMarshallerImpl.JAXME_XML_DECLARATION, Boolean.FALSE);
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.test.misc.address.impl.AddressImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.