byte[] inputByteArray = byteBuffer.array();
InputStream in = new ByteArrayInputStream(inputByteArray);
try {
ContactIOFactory ciof = Pim.getContactIOFactory();
ContactUnmarshaller unmarshaller = ciof.createContactUnmarshaller();
Contact[] contacts = unmarshaller.unmarshallContacts(in);
for (Contact contact: contacts) {
PersonalIdentity pid = contact.getPersonalIdentity();
Map<String, Object> serviceCtx = UtilMisc.<String, Object>toMap("firstName", pid.getFirstname(), "lastName", pid.getLastname());