Skip to Content
Jan 25, 2007 at 01:56 AM

Unable to get the code error free


Hi All,

Let me first mention about what I am trying to acheive:

I am trying to execute an EJB exposed as a webservice from Visual Composer. The EJB will call a BAPI in the backend SAP System through SAP Logon Ticket

What I have done till now:

-I have created a RFC Destination in the J2EE Visual Admin.

-I have coded an EJB that will do a lookup into the JNDI registry and fetch the system details

-Now I need to get the SAP Logon ticket from the Visual composer application which will be a Portal iView later on and pass it on to the EJB via the webservice and connect to the SAP System through JCO and execute the function module

I went through the Forums and found that the code below should work:

HttpServletRequest request = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();

Cookie[] cookies = request.getCookies();

String cookieName = "MYSAPSSO2";//SAPCookie;

for ( int i=0; i<cookies.length; i++) {

Cookie cookie = cookies;

if (cookieName.equals(cookie.getName())){



IUser user1 = WDClientUser.getCurrentUser().getSAPUser();

String sso = (String)user1.getTransientAttribute(IPrincipal.DEFAULT_NAMESPACE, "MYSAPSSO2_STRING");

The problem that I have is that I am not being able to find the package where I have the IWebContextAdapter and the WDWebContextAdapter. I assume these are Webdnpro classes and I am not sure whether this will work in my context.

I would appreciate if anyone could help me out in this issue!

Best regards,