IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Current user from java service [invoked from web service]???

  • 1.  Current user from java service [invoked from web service]???

    Posted Wed March 08, 2006 07:39 AM

    Hello,

    I have simple webservice that calls a java service. The problem is from the java service I’m trying to find out what user has called the webservice. I have tried the following code, but keeps returning ‘Administrator’ no matter who I login as ???

    Session session = Service.getSession();
    User currentUser = session.getUser();
    IDataUtil.put( pipelineCursor, “userName”, currentUser.getName() );

    I’m really confused by this. Is there everybody who can help me on this on?

    Thanks
    Q


    #API-Management
    #webMethods
    #soa


  • 2.  RE: Current user from java service [invoked from web service]???

    Posted Wed March 08, 2006 08:22 PM

    How is the webservice consumer authenticating when they post their SOAP message to the IS soap processor (default, rpc or custom)? My guess is that they are using basic authentication with the Administrator user (and probably the default password).

    If so, that tells IS that the consumer of the web service is Administrator 100% of the time. If you want to identify users differently, you can have them authenticate using unique credentials or you can assert user identify in the soap message itself using something like a WS-Security UsernameToken in the soap message header.

    Mark


    #API-Management
    #soa
    #webMethods


  • 3.  RE: Current user from java service [invoked from web service]???

    Posted Thu March 09, 2006 01:38 AM

    Thank you for your response Mark. You are correct in assuming I’m using basic authentication, however I have tried authenticating using accounts other than Administrator. This is why I’m confuss as to why wm still thinks the user is Administrator. Shouldn’t it be the same user as who authenticated using the web service?

    I should also mention I’m using wm 6.1


    #API-Management
    #webMethods
    #soa