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("[EMAIL PROTECTED]");
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
begin:vcard
fn:Dave Pederson
n:Pederson;Dave
org:NightHawk Radiology Services;IT-Development
adr:;;223 N. Water St. Suite 200;Milwaukee;WI;53202;USA
email;internet:[EMAIL PROTECTED]
title:Software Engineer II
tel;work:414-220-4295 x307
x-mozilla-html:TRUE
url:http://www.nighthawkrad.net
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]