cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Sap portal login user in ejb web service

Former Member
0 Kudos

Hi,

I wnt to access SAP Portal login user in my ejb application which resides on the same server.

I am using following code

try {

IUser user =null; IWDClientUser wdUser = WDClientUser.getCurrentUser();

user = wdUser.getSAPUser();

} catch (WDUMException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

Some additional jar files are required for this?

The same code works fine with webDynpro but not with ejb.

Thanks in advance

Best regards,

Nilesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This problem is resolved.

Thanks

Former Member
0 Kudos

hi can provide how you have solved the problem

sid_sunny
Contributor
0 Kudos

Hi Nilesh,

Yes you need com.sap.security.api to use the classes IUser etc,

Regards

Sid

Former Member
0 Kudos

Thanks for reply.

I have already added com.sap.security.api in my EJB module project classpath. How to add the same in EJB application Project (application-j2ee-engine.xml)?

Best regards,

Nilesh

sid_sunny
Contributor
0 Kudos

Hi Nilesh,

You will have to create a DC of type "External Library". Deploy this DC also before your EJBs are deployed, create a public part for this "External Library" DC and add the reference of the public part to EJB DC.

For reference refer to this [BLOG|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2361] [original link is broken] [original link is broken] [original link is broken];

Regards

Sid

Former Member
0 Kudos

Orelse expose your EJB as webservice and try to call the webservice into webdynpro application.