Hmm, according to Wireshark, there are no packets being sent with
http.authorization or http.basicauth headers.

The tester client is .Net, simplified code to isolate this particular issue
(just generated a new web reference class pointing to a simple test
webmethod exposed in the same cxf project) is:

Dim proxy As New helloworld.HelloWorldService()
proxy.Credentials = New NetworkCredential("Administrator", "Administrator")
Dim result As String = proxy.greet()
Response.Write(result)


In this case, the test webmethod code is:

public String greet(){
     MessageContext mc = context.getMessageContext();
        
     Principal authUser = context.getUserPrincipal();
     AuthorizationPolicy policy =
(AuthorizationPolicy)mc.get(AuthorizationPolicy.class.getName());

     String username = "";
     String password = "";
        
     if(policy != null){
        username = policy.getUserName();
        password = policy.getPassword();            
     }
     
     return "Hello, " + username + ":" + password;
}

Both authUser and policy are null objects, so something is definitely wrong
with how the authentication gets set and/or accessed.

I'll see if I can add a quick test client in Java to try the authentication
out with. In the meantime, ideas are most welcome...
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Moving-from-Axis-to-CXF-tp2653453p2740457.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to