private static Collection<? extends Phone> MapPhone(List<org.uddi.api_v2.Phone> phone) { List<Phone> r = new ArrayList<Phone>(); if (phone == null) { return r; } for (int i = 0; i < phone.size(); i++) { Phone x = new Phone(); x.setUseType(phone.get(i).getUseType()); x.setValue(phone.get(i).getValue()); r.add(x); } return r; }
public static void PrintContacts(Contacts contacts) { if (contacts == null) { return; } for (int i = 0; i < contacts.getContact().size(); i++) { System.out.println("Contact " + i + " type:" + contacts.getContact().get(i).getUseType()); System.out.println("Name: " + contacts.getContact().get(i).getPersonName()); for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) { System.out.println("Email: " + contacts.getContact().get(i).getEmail().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) { System.out.println("Address sort code " + contacts.getContact().get(i).getAddress().get(k).getSortCode()); System.out.println("Address use type " + contacts.getContact().get(i).getAddress().get(k).getUseType()); System.out.println("Address tmodel key " + contacts.getContact().get(i).getAddress().get(k).getTModelKey()); for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) { System.out.println("Address line value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue()); System.out.println("Address line key name " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName()); System.out.println("Address line key value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue()); } } for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) { System.out.println("Desc: " + contacts.getContact().get(i).getDescription().get(k).getValue()); } for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) { System.out.println("Phone: " + contacts.getContact().get(i).getPhone().get(k).getValue()); } } }