Skip to Content
0
Former Member
Aug 08, 2007 at 05:05 PM

WebDynPro - UWL Portal Service - Cache Clearing

135 Views

Hello All...

I am trying to write a webdynpro that will use the uwl portal service (APIhttp://help.sap.com/javadocs/NW04S/SPS09/uw/com/sap/netweaver/bc/uwl/IUWLService.html">API>) and display work items in a small enough format for the BlackBerry. This works fine but what I have found is this...when I clear the UWL cache, the items will not come back into the list unless I open the UWL in the portal for that user. It appears that the portal UWL app kicks off some type of retrieval method that does not seem to be available in the UWL Portal Service APIs. I am almost ready to abandon the UWL Portal Service.

Here is the code I am using to get the service, session and context...I am using some other code to retrieve the items from the ItemManager (even tried the refresh cache method there):

	IUWLService uwls = null;
	UWLContext uwlContext = new UWLContext();
	IUWLSession uwlSession = null;

	Hashtable env = new Hashtable();
	env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sapportals.portal.prt.registry.PortalRegistryFactory");
	InitialContext context = null;

	
	try {
		context = new InitialContext(env);			
		uwls = (IUWLService)context.lookup("/broker/services/" + IUWLService.ALIAS_KEY );

		uwlContext.setAllowBackEndConnections(true);		
		uwlContext.setUser(WDClientUser.forceLoggedInClientUser().getSAPUser());
		uwlContext.setLocale(WDClientUser.getLoggedInClientUser().getSAPUser().getLocale());

		uwlSession = uwls.getUwlSessionForWebDynproClient(uwlContext);
		uwlContext.setSession(uwlSession);
	} catch (Exception e) {
		e.printStackTrace();
		wdControllerAPI.getMessageManager().reportException(e.getMessage(),true);
	}

Any ideas how I can make the UWL Portal Service get data from all of its connections?

Thanks,

BK