axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Tyler - ISD <Michael.Ty...@wal-mart.com>
Subject Trying to get the username in the web service
Date Mon, 02 Apr 2012 18:35:50 GMT
Folks,

What I am trying to do is build a way to track which user calls which operation within the
service.

I am attempting to determine what the username was that was setup in the rampart structure
from within the web service.

From within the service_invoke function I am doing this:

                        conf_ctx = axis2_msg_ctx_get_conf_ctx( msg_ctx, env );

                        if( conf_ctx == NULL )
                        {
                                Log( "Failed to find configuration context" );
                        }
                        else
                        {
                                Log( "about to get axis2_conf_ctx_get_conf" );

                                conf = axis2_conf_ctx_get_conf( conf_ctx, env );

                                if( conf == NULL )
                                {
                                        Log( "Failed to get axis2_conf_ctx_get_conf" );
                                }
                                else
                                {
                                        Log( "about to get axis2_conf_get_security_context"
);

                                        rampart_context =
                                                ( rampart_context_t * )axis2_conf_get_security_context(
                                                conf
                                                , env
                                        );

                                        if( rampart_context  == NULL )
                                        {
                                                Log( "Failed to find security param" );
                                        }

The rampart_context is NULL;

I have found this in axis2c/src/core/engine/conf.c

/* This is a hack to keep rampart_context at client side */
    void *security_context;

Is this possible?  Does anyone have an example?  Is this a security issue?


L. Michael Tyler, II
System Analyst - ISD Aps Dev Store Systems Services
Phone 479.277.2811
BlackBerry 479.420.3798
Michael.Tyler@wal-mart.com<mailto:Michael.Tyler@wal-mart.com>
page Tyler Michael<mailto:pageLMTYLER>





This email and any files transmitted with it are confidential and
intended solely for the individual or entity to whom they are
addressed. If you have received this email in error destroy it
immediately. 

                                               *** Walmart
Confidential ***
Mime
View raw message