From xmlrpc-user-return-1331-apmail-ws-xmlrpc-user-archive=ws.apache.org@ws.apache.org Fri Jun 03 23:01:07 2005 Return-Path: Delivered-To: apmail-ws-xmlrpc-user-archive@www.apache.org Received: (qmail 84707 invoked from network); 3 Jun 2005 23:01:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jun 2005 23:01:07 -0000 Received: (qmail 42314 invoked by uid 500); 3 Jun 2005 23:01:05 -0000 Delivered-To: apmail-ws-xmlrpc-user-archive@ws.apache.org Received: (qmail 42290 invoked by uid 500); 3 Jun 2005 23:01:04 -0000 Mailing-List: contact xmlrpc-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: xmlrpc-user@ws.apache.org List-Id: Delivered-To: mailing list xmlrpc-user@ws.apache.org Received: (qmail 42275 invoked by uid 99); 3 Jun 2005 23:01:04 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from 42dbcb79.dsl.aros.net (HELO bigmac.hydroblaster.com) (66.219.203.121) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 03 Jun 2005 16:01:03 -0700 Received: from tgd140 ([192.168.1.199]) by bigmac.hydroblaster.com (8.12.8/8.12.8) with ESMTP id j53N0kJk023821; Fri, 3 Jun 2005 17:00:48 -0600 Message-Id: <200506032300.j53N0kJk023821@bigmac.hydroblaster.com> From: "Terrance Davis" To: Subject: basic authentication failing in 2.0 Date: Fri, 3 Jun 2005 17:00:56 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcVokBmHF3Afi9yTR4aIyxUOEhTT7Q== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Hydroblaster-MailScanner-Information: Please contact the ISP for more information X-Hydroblaster-MailScanner: Found to be clean X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'm using: xmlrpc-current.zip 25-May-2005 14:54 752k Apache XMLRPC downloads The specific jar is: xmlrpc-2.0.jar I start the WebServer with the command: java org.apache.xmlrpc.WebServer Then I run a client to connect using basic authentication. Here is the client code: import java.util.*; import org.apache.xmlrpc.*; public class MyTestClient { /** * Just for testing. */ public static void main(String args[]) throws Exception { try { String url = "http://localhost:8080"; String method = "auth.test"; Vector v = new Vector(); v.addElement("Just testing"); v.addElement(new Integer(123)); XmlRpcClient client = new XmlRpcClient(url); client.setBasicAuthentication("someuser","somepasswd"); System.out.println(client.execute(method, v)); } catch(Exception e){ e.printStackTrace(); } } } Authentication fails with this message: org.apache.xmlrpc.XmlRpcException: org.apache.xmlrpc.XmlRpcException: Sorry, you're not allowed in here! The body of 'auth' is: package org.apache.xmlrpc; import java.util.Vector; /** * * @author Hannes Wallnoefer * @version $Id: AuthDemo.java,v 1.3 2005/04/22 10:25:57 hgomez Exp $ */ public class AuthDemo implements AuthenticatedXmlRpcHandler { /** * */ public Object execute(String method, Vector v, String user, String password) throws Exception { // our simplistic authentication guidelines never fail ;) if (user == null || user.startsWith("bad")) { throw new XmlRpcException(5, "Sorry, you're not allowed in here!"); } return ("Hello " + user); } } So what gives? Why the failure? Terrance