This discussion is archived
1 Reply Latest reply: Oct 21, 2008 11:25 PM by 843830 RSS

http-bc dosen't forward user principal /credentials to JBI

843830 Newbie
Currently Being Moderated
Hello,
do i have to configure the wsdl for the port on the http-bc in a special way to forward the user credentials over the JBI?

I have a http-bc which offers a WS with basic http auth against a file or a fixed username. The username/pw check of the WS is working!
Its configured like here http://wiki.open-esb.java.net/Wiki.jsp?page=HTTPBasicAuthentication.

now i want to access the user principals like this in the J2ee engine behind the JBI/NMR

########################################################################
@Resource WebServiceContext wsContext;
...................
return "Congrats user data is" + wsContext.getUserPrincipal() ;
...............
########################################################################

it always retuns "null" :-/

thanks

Philipp
  • 1. Re: http-bc dosen't forward user principal /credentials to JBI
    843830 Newbie
    Currently Being Moderated
    sorry it was my fault....

    The problem was that I used

    ###########################################################################
    @Resource WebServiceContext wsContext;
    public String hello(String msg) {
    return "Servlet WS: " + wsContext.getUserPrincipal();

    ###############################################################################
    But correct is
    ################################################################################
    @Resource SessionContext context;
    return "Congrats user data is" + context.getCallerPrincipal() ;
    ###############################################################################