tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Baranski" <>
Subject 302 Error with XMLRPC app
Date Thu, 29 Oct 2009 15:33:59 GMT

Here is my web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun
Microsystems, Inc.//DTD Web Application 2.3//EN"

    <display-name>Security Managment Consulting</display-name>




I have the following java class:

package com.secmgmt.xmlrpc.change_status; import org.apache.log4j.Logger;

public class ChangeStatus
    public static final int SUCCESS = 0;
    public static final int INVALID_LOGIN = 1;
    public static final int EID_NOT_FOUND = 2;
    public static final int SERVER_NOT_PRIMARY = 3;
    public static final int NO_CHANGE_NEEDED = 4;

    private static Logger l = Logger.getLogger(ChangeStatus.class);

    public static final String ACTIVE = "ACTIVE";
    public static final String INACTIVE = "INACTIVE";
    public static final int PP_ACTIVE = 0;
    public static final int PP_INACTIVE = 1;
    public ChangeStatus()
            l.debug("Created the status xmlrpc class");

    public boolean ping()
            return true;

    public int add(int one, int two)
            l.debug("Adding " + one + " and " + two);
            return one + two;

    public int changeStatus(String eid, String user, String password, String
            return SUCCESS;

The following in the properties file:

My webapp deploys properly, and I never see an error in the logs anywhere
when I hit it.  My python program is:

import xmlrpclib
from pprint import pprint

p = xmlrpclib.ServerProxy("")
print "Server created"
    #print p.system.listMethods()
    #print dir(p)
    p._ServerProxy__verbose = 1
    print "Ping result: %s" % ( except
xmlrpclib.Error, v:
    print "ERROR", v

print "Done"

Here is the output:

Server created
connect: (, 8080)
send: 'POST /xmlrpc-status HTTP/1.0\r\nHost:\r\nUser-Agent: (by\r\nContent-Type: text/xml\r\nContent-Length:
send: "<?xml
reply: 'HTTP/1.1 302 Moved Temporarily\r\n'
header: Server: Apache-Coyote/1.1
header: Location:
header: Date: Wed, 28 Oct 2009 19:47:50 GMT
header: Connection: close
ERROR <ProtocolError for 302 Moved
Temporarily> Done

Any idea why I get the 302 error?  My XML-RPC appears to be correct.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message