on 09-27-2005 7:59 AM
Hello,
When I try to retrieve content from KM using this code:
IResourceFactory factory = ResourceFactory.getInstance();
IResource resource = factory.getResource(rid, context);
IContent content = resource.getContent();
I get a <i>wcm.repository.ResourceException: Operation getContent(com.sap.netweaver.bc.rf.common.IResourceHandle) is not yet supported/implemented!</i> exception.
I think my code is the same I have found in the examples.
Does anyone know what I am doing wrong?
Thanks in advance!
Oh! You were right, I think I got it.
Thanks!.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Antonio,
> I have to code my own repository manager
> in order to retrieve resource content
No, not at all! The code you're using looks fine at a first glance. The question is: What RID did you use (maybe you tried to look up some repository content where this is not supported)?
Maybe you can strip down your code to a few lines so that the exception still occurs (no extra line) and offer the whole (then: little) class, so we could also check the imports etc.
Hope it helps
Detlev
Hi Detlev,
I am developing a web service to upload and download content into and from KM. When I upload a document I get a shortID (for example /guid/2092cec9-8f11-2810-2da9-dafd37c35f45) and that's what I use to try to retrive the document. I get it by using a IUriMapperService.
I checked the shortID I got from my "uploader" and it is the same that document properties shows. So it is correct.
This is my code:
public byte[] getDocument(String documentRID) {
com.sapportals.portal.security.usermanagement.IUser iUser = null;
RID rid = RID.getRID(documentRID);
try {
iUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
IResourceContext context = new ResourceContext(iUser);
IResourceFactory factory = ResourceFactory.getInstance();
IResource resource = factory.getResource(rid, context);
IContent content = resource.getContent();
....
At that point I get the exception.
Thanks.
Message was edited by: Antonio David Ramírez Moreno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.