cancel
Showing results for 
Search instead for 
Did you mean: 

Accesing Km repository From portal application

Former Member
0 Kudos

Dear All,

Hi,I'm trying to access Km Repository through Abstract portal component.We were using EP 7.0.I try for this code.

IUser user = UMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");

IResourceContext resourceContext = new ResourceContext(user);

RID rid = RID.getRID("/documents");

IResource resource = ResourceFactory.getInstance().getResource(rid, resourceContext);

if( resource != null ) {

// resource found

System.out.println("resource" + resource.getRID() +"found");

} else {

// resource not found

System.out.println("resource" + resource.getRID() +"does not excist");

}

}catch(UMException e)

{

e.printStackTrace();

}catch( ResourceException e )

{

// problem while retrieving the resource

System.out.println("exception while trying to get resource" + e.getRID() + ":" + e.getMessage());

}

I got error like ResourceContext not defind.I'm using 7.0 deployment.ResorceContext is not defind in new api.

So Any body have work on the same,please send sample code/document.

Bye,

santhosh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Santhosh,

Check these url:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9237e490-0201-0010-f3a1-9a322ccbd8b1">Prerequisites and Relevant Knowledge Management APIs</a>

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/kmc/getting%2ban%2bimage%2bfrom%2bkm%2bdocument%2bto%2bbe%2bused%2bin%2bweb%2bdynpro">km Document to be used in Web DynPro</a>

regards

Sumit