ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Pederson <dpeder...@nighthawkrad.net>
Subject WebServer Authentication Problem
Date Fri, 11 Aug 2006 16:18:59 GMT
Hello-

I am trying to get username, password authentication working with the 
WebServer class (yes, even though its declared as a "Workaround").   I 
need to use the WebServer class because I am in the process of adding 
XML-RPC hooks into existing Java server applications that do not run in 
a servlet-container.  I have created my own 
PropertyHandlerMapping.AuthenticationHandler which has the following method:

public boolean isAuthorized(XmlRpcRequest pRequest)
{
    if (pRequest.getConfig() instanceof RequestData)
    {
        RequestData data = (RequestData) pRequest.getConfig();
        System.out.println("username = "+data.getBasicUserName());
        System.out.println("password = "+data.getBasicPassword());
    }
}

Then, on the client side, I set the username and password in the config:

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerUrl("http://127.0.0.1:8080/xmlrpc");
config.setBasicUserName("adst-test");
config.setBasicPassword("adst-test#@!");
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
Object[] params = new Object[]{new Integer(1), new HashMap()};
Map result = (Map) client.execute("AssignmentService.getAssignees", params);


The remote method call executes successfully, however, the System.out 
statements always reveal the following:

username = null
password = null


Why is it that the basic username and password are not being sent to the 
server side?  -or-
Are they actually getting to the server side, and I'm just accessing 
them incorrectly?

Thanks in advance,

-Dave

Mime
View raw message