Skip to Content
author's profile photo Former Member
Former Member

Accessing UWL-API out of Web Dynpro Java

Hi,

I'm trying to use the UWL-API as described herehttps://help.sap.com/javadocs/NW04S/current/uw/index.html">here> within my Web Dynpro-App. My coding looks somehow like this:

IUWLService uwlService=(IUWLService)PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY);

UWLContext myContext = new UWLContext();

try {

IUWLSession mySession = uwlService.getUwlSessionForWebDynproClient(myContext);

} catch (Exception e) {

IWDMessageManager myMan = wdComponentAPI.getMessageManager();

myMan.reportSuccess(e.toString());

}

Well when i deploy that app and run it (i integrated the app into an iview, although i'm not sure whether have to or not) i get the following error:

java.lang.NoClassDefFoundError: com/sap/netweaver/bc/uwl/IUWLSession

Maybe i have to add a sharing reference or s.th. similar in order to use that API?

I'll reward points for any useful answer.

thanks a lot

Michael

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 03:45 PM

    Hi Michael,

    please try to delete the sharing reference and to include the library directly in the WD:

    Properties-> java build path -> Library -> Add external JARs

    The deploy.... in this case you are sure that it's not a reference problem.

    Hope this help you,

    Vito

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Michael,

      I have same requirement like you for accessing uwl task in webdynpro. i added 2 external jar file prtapi.jar & bc.uwl.service.api_api.jar but during runtime i am getting

      java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime

      regards,

      sukanta

  • Posted on Jun 19, 2008 at 08:47 AM

    Use instead:

    IUWLService service = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);

    This will work better, since webdynpro do not need to be run within the prt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.