Dear Geir,
   Thank you for your help. I was doing exactly the same what was mentioned
in the Thread and what you suggested today but yesterday I failed to notice
the HTTP headers regarding Authorization: Basic. But today when I executed
the client without any change it was working as required.  I assume that it
must be my mistake. I was hoping that Authorization: Basic will be the last
thing in the HTTP Header just before SOAP Message as normally it is the case
for Axis 1.X but infact it was somewhere in the middle of HTTP header for
Axis2.

Now moving to the Server side implementation, I was expecting retrieving the
result will be simple so I tried on the lines similar to Axis 1.X, below is
the code listing:

        inMesasgeContext = MessageContext.getCurrentMessageContext();

        if(inMesasgeContext == null)
            System.out.println("inMesasgeContext is null");
        else System.out.println("inMesasgeContext is NOT null"); //
MessageContext is not NULL

        Options options = inMesasgeContext.getOptions();

       HttpTransportProperties.Authenticator authProperties = (
          HttpTransportProperties.Authenticator)
options.getProperty(HTTPConstants.AUTHENTICATE);
        
        if(authProperties != null){
            System.out.println("UserName: " + authProperties.getUsername());
        }else {
            System.out.println("authProperties is null");
        }

But it always print "authProperties is null". Once again I must be making
error in casting i.e. casting the Object in wrong class. 

Your help is appreciated.

Cheers
Asif
-- 
View this message in context: 
http://www.nabble.com/AXIS2-1.1.1-problem-with-BASIC-AUTH-tf3559184.html#a10146297
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to