Skip to Content
0
Former Member
May 18, 2007 at 09:53 AM

How get Portal Services in EJB (Web Service)

38 Views

Hi,

i want to use a Web Service to create a new folder in my KM-Content. But if i test my Web Service with the Web Service Navigator the WS doesn't create a new folder. If i take a Portal Application Project (PAP) with the same piece of code it works well.

I think i need to access to <b>Portal Services</b>. How can i do that programatically?

myCode:

	IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
	ResourceContext rContext = new ResourceContext(user);
	RID aRid = RID.getRID("/documents/Testordner");
	IResourceFactory resourceFactory = ResourceFactory.getInstance();
	ICollection aCollection =
		(ICollection) resourceFactory.getResource(aRid, rContext);

	if (aCollection != null) {
		IResource resource =
			aCollection.createResource("NewFolder_4_You", null, null);
	}

regards,

Sharam

Message was edited by:

Sharam Pourmir