Skip to Content
0
Former Member
Oct 18, 2006 at 07:10 AM

Problem with KM API after upgrading to SP18

14 Views

Hello,

We have recently upgraded from SP14 to SP18 and have found that our code to create folders and documents in KM via API has stopped working.

For example, we use this code to create a folder. It is part os a Web Service used from .NET applications to use KM repositories.

private String createFolderInKM(String parentRID, String folderName,
IPropertyMap propertyMap) throws Exception {

com.sapportals.portal.security.usermanagement.IUser iUser = null;

//Informamos el identificador de la carpeta donde la subcarpeta
RID rid = RID.getRID(parentRID);

//Recuperamos el usuario de servicio
iUser =
WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");

//Recuperamos el contexto del usuario
IResourceContext context = new ResourceContext(iUser);

//Recuperamos la carpeta donde crearemos la subcarpeta
IResourceFactory factory = ResourceFactory.getInstance();
IResource resource = factory.getResource(rid, context);

ICollection parent = (ICollection) resource;

//Creamos la carpeta
ICollection collection = parent.createCollection(folderName, propertyMap);

//Averiguamos el nuevo GUID
IUriMapperService mapper = UriMapperServiceFactory.getInstance();

//Devolvemos el nuevo GUID
return mapper.getGuidRIDFromRID(collection.getRID()).getPath();

}

We get "com.sapportals.wcm.repository.NotSupportedException" when we call the createCollection method. We get the same using createResource to create documents.

Any idea?

Thanks in advance for your help.