Maybe this piece of my code will help you to find out how to do it, is in Spanish, I am sorry about the Spanish.
This code only retrieves properties from an XML but for attributes is quite the same.
Good luck!
public static ListaDocumentosPentsFirmante RetrieveFromSoap(SoapObject soap){
SoapObject root = (SoapObject) soap.getProperty("getListaPendientesFirmanteResponse");
ListaDocumentosPentsFirmante pagina_doc = new ListaDocumentosPentsFirmante();
ArrayList<DocumentoBandejaFirmanteBean> lista_doc= new ArrayList<DocumentoBandejaFirmanteBean>();
/* Parsing every doc entry*/
for (int i = 0; i < root.getPropertyCount(); i++){
Object property = root.getProperty(i);
if(property instanceof SoapObject){
SoapObject category_list = (SoapObject) property;
DocumentoBandejaFirmanteBean doc= new DocumentoBandejaFirmanteBean();
//En caso de no existis?
if (category_list.hasProperty("codigoDocumento"))
doc.setCodigoDocumento(Long.parseLong(category_list.getProperty("codigoDocumento").toString()));
if (category_list.hasProperty("nombreDocumento"))
doc.setNombreDocumento(category_list.getProperty("nombreDocumento").toString());
if (category_list.hasProperty("nombreSolicitante"))
doc.setNombreSolicitante(category_list.getProperty("nombreSolicitante").toString());
if (category_list.hasProperty("revisado"))
doc.setRevisado(Boolean.valueOf(category_list.getProperty("revisado").toString()));
if (category_list.hasProperty("clasificado"))
doc.setClasificado(Boolean.valueOf( category_list.getProperty("clasificado").toString()));
if (category_list.hasProperty("tieneAnexos"))
doc.setTieneAnexos(Boolean.valueOf( category_list.getProperty("tieneAnexos").toString()));
if (category_list.hasProperty("nombreTipoDocumento"))
doc.setNombreTipoDocumento(category_list.getProperty("nombreTipoDocumento").toString());
if (category_list.hasProperty("nombreUnidadAdministrativa"))
doc.setNombreUnidadAdministrativa(category_list.getProperty("nombreUnidadAdministrativa").toString());
if (category_list.hasProperty("prioridad"))
doc.setPrioridad(Integer.parseInt(category_list.getProperty("prioridad").toString()));
//Date mdFechaAlta = DateFormat.parse(category_doc.getProperty("CATEGORY").toString());
lista_doc.add(doc);
}
}
pagina_doc.setDocumentos(lista_doc);
pagina_doc.setPaginaActual(Integer.parseInt(root.getProperty("paginaActual").toString()));
pagina_doc.setTotalDocumentos(Integer.parseInt(root.getProperty("totalDocumentos").toString()));
pagina_doc.setTotalPaginas(Integer.parseInt(root.getProperty("totalPaginas").toString()));
return pagina_doc;
}