Skip to Content
0
Nov 22, 2008 at 11:12 AM

UWL in CE: APIs and... DC(s) ???

31 Views

Guys,

I am running CE EhP1 and I want to do some programmatic stuff on UWL.

So I go [here|http://help.sap.com/javadocs/nwce/current/uw/index.html], and look for how to manipulate UWL items. Let me first notice that though this javadoc is under "CE", the title states "SAP NetWeaver 2004S SPS 10"... Bad, bad, bad.

What I need is maybe (I don't know since I couldn't try yet... read on) [IUWLItemManager|http://help.sap.com/javadocs/nwce/current/uw/com/sap/netweaver/bc/uwl/IUWLItemManager.html], which is obtained via [IUWLService|http://help.sap.com/javadocs/nwce/current/uw/com/sap/netweaver/bc/uwl/IUWLService.html]. Very good.

So now, the first question: how are we supposed to GUESS (???) what DC is to be used for a certain purpose? For instance, in my NWDS, I couldn't find any DC for UWL... Does anybody know which is/are the right one/s to put dependency on in a DC project...?

Secondly, despite of the right DC, the doc gives two approaches for getting the IUWLService:

-1-

IUWLService is a portal service and is accessible by calling PortalRuntime api. 
IUWLService uwlService = 
(IUWLService)PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY);  

This doesn't work, bacause it relies on PortalRuntime: I have set a dependency on tc/epbc/prt/api, and that's ok, but then I can't neither compile nor build or run because of indirect references to classes that cannot be found in any DC... (searched in the whole NWDS file system with JarClassFind...)

-2-

"Alternatively JNDI look up can also be done for the key IUWLService.ALIAS_KEY to get a handle to UWL service."

So I tried with this:

InitialContext ctx = new InitialContext();
uwlService = (IUWLService)ctx.lookup(IUWLService.ALIAS_KEY);

No way... NameNotFoundException (or somthing like this...). Also looked in the JNDI Registry in NWA and, that's right... No way I could find the IUWLService.ALIAS_KEY string.

So finally: is anybody able to get this UWL APIs working on CE EhP 1?

Since this a CE EhP1 issue, I will cross post on NetWeaver BPM forum, [here|https://forums.sdn.sap.com/thread.jspa?threadID=1138660&tstart=0].

Cheers,

Alex