Here is the solution for mi scenario. Given the custom objects and attributes detailed in the original post:
1.- Include the alfresco opencmis extension lib.
<dependency>
<groupId>org.alfresco.cmis.client</groupId>
<artifactId>alfresco-opencmis-extension</artifactId>
<version>1.0</version>
</dependency>
2.- The code:
Map<String, Object> properties = new HashMap<String, Object>();
//properties.put(PropertyIds.OBJECT_TYPE_ID, "D:APBRegistro:anexo");
properties.put(PropertyIds.OBJECT_TYPE_ID, "D:APBRegistro:anexo,P:APBRegistro:d_anexo");
properties.put(PropertyIds.NAME, fileFinalame);
properties.put("APBRegistro:dr_obsAlfresco", "HELLOOOO");