Skip to Content
avatar image
Former Member

Webservice & Webdynpro SSO

hi guys, we have a legacy J2EE solution and using webdynpro as a UIto that legacy solution. We have some webservices from XI which i need to consume in J2EE. I have created the client stubs using the deployable components and have wrtten the code in facade beans to consume the service. i require to enable sso between the webdynpro/j2ee layer and webservice. any ideas will be appreciated

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 15, 2006 at 05:12 AM

    Step 1: To perform SSO: Create systems(webservices to be accessed) that are to be accessed in webdynpro application. This can be done in System Administration -> System Configuration. Also create the System Aliases along with it.

    Step 2: Perform the user mapping in User Administration -> User Mapping for the users who are going to access the application. In this section select the systems created and enter that application's user name and password details.

    Step 4: Enter the below code to get the User name and password for the systems :

    try

    {

    HashMap mapattr = new HashMap();

    HashMap map = new HashMap();

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

    IPrincipal principal = (IPrincipal)user;

    ArrayList list = UMFactory.getSystemLandscapeWrappers();

    ISystemLandscapeWrapper systemLandscape = (ISystemLandscapeWrapper)list.get(0);

    //Portal System ALias name

    ISystemLandscapeObject landScapeObject = systemLandscape.getSystemByAlias(<enter the alias name created for the system>);

    IUserMappingData userMapping = (IUserMappingData) UMFactory.getUserMapping().getUserMappingData(landScapeObject,principal);

    userMapping.enrich(map);

    mappedUserId = map.get("user").toString(); // String "UserId"

    mappedPassword = map.get("mappedpassword").toString(); //String "Password"

    }

    catch(Exception e)

    {

    e.printStackTrace();

    wdComponentAPI.getMessageManager().reportException("Exception during retrieving the User Details - " + e.getMessage(),true);

    }

    This finishes the SSO part for WS and Webdynpro.

    Hope this solves your problem.

    Thanks & Regards,

    Amar Bhagat Challa

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 13, 2007 at 03:52 PM

    hi Amar,

    i tried the code given below, but i have an error javax.xml.soap.SOAP(Message)

    class file is missing.

    can u please suggest me wat am i supposed to do.

    venkat.

    Add comment
    10|10000 characters needed characters exceeded