Hello,

I'm having a problem getting http auth working. 

When I call my service without auth, it works fine. 

[EMAIL PROTECTED] xmlrpc]$ ./run
Output from hello() : Hello, World!

But when I move it to a location on the server that requires auth, and
provide it in the client with setBasicAuthentication(), I get this.

java.io.IOException: Unexpected Response from Server:  Found
        at
org.apache.xmlrpc.XmlRpcClientLite$HttpClient.sendRequest(Unknown
Source)
        at org.apache.xmlrpc.XmlRpcClientLite$LiteWorker.execute(Unknown
Source)
        at org.apache.xmlrpc.XmlRpcClient.execute(Unknown Source)
        at EsDbClient.hello(EsDbClient.java:23)
        at EsDbClient.main(EsDbClient.java:35)
Output from hello() : Call to hello method failed

My code, with the password obfuscated...

    public String hello()
    {
        String retVal = "Call to hello method failed";
        try
        {
            XmlRpcClientLite xmlrpc = new XmlRpcClientLite(URL_AUTH);
            String methodName = "hello";
            Vector params = new Vector(0);

            xmlrpc.setBasicAuthentication("admin", "********");

            retVal = (String) xmlrpc.execute( methodName, params );      
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        return retVal;
    }

Help appreciated. 

Thanks,
Mike

-- 
Michael P. Soulier <[EMAIL PROTECTED]>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix

Reply via email to