Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 14940 invoked from network); 29 Oct 2009 15:33:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Oct 2009 15:33:48 -0000 Received: (qmail 48473 invoked by uid 500); 29 Oct 2009 15:33:44 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 48393 invoked by uid 500); 29 Oct 2009 15:33:44 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 48382 invoked by uid 99); 29 Oct 2009 15:33:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 15:33:44 +0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,URI_NOVOWEL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.162.201.195] (HELO www.secmgmt.com) (66.162.201.195) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 29 Oct 2009 15:33:33 +0000 Received: from smcdhsi7eg25no (smcraleigh.secmgmt.com [24.106.188.250]) by www.secmgmt.com (8.13.1/8.13.1) with SMTP id n9TFXBC9009006 for ; Thu, 29 Oct 2009 11:33:11 -0400 From: "Mike Baranski" To: "'Tomcat Users List'" Subject: 302 Error with XMLRPC app Date: Thu, 29 Oct 2009 11:33:59 -0400 Message-ID: <002201ca58ad$3c314990$b493dcb0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcpYrThRN9n3xa0gQ42UHBLvtyPSOQ== Content-Language: en-us x-cr-hashedpuzzle: A2yZ A/XM BTds Bp77 B4AG EufW FwXH HHwu HgCG JDWU JP9T J38K KMEC Kw15 KyAS K8oN;1;dQBzAGUAcgBzAEAAdABvAG0AYwBhAHQALgBhAHAAYQBjAGgAZQAuAG8AcgBnAA==;Sosha1_v1;7;{610349E1-802C-48FD-8EAA-7139D6367401};bABpAHMAdAAtAHMAdQBiAHMAYwByAGkAcAB0AGkAbwBuAHMAQABzAGUAYwBtAGcAbQB0AC4AYwBvAG0A;Thu, 29 Oct 2009 15:33:53 GMT;MwAwADIAIABFAHIAcgBvAHIAIAB3AGkAdABoACAAWABNAEwAUgBQAEMAIABhAHAAcAA= x-cr-puzzleid: {610349E1-802C-48FD-8EAA-7139D6367401} X-Virus-Scanned: ClamAV 0.88.7/9959/Wed Oct 28 22:55:08 2009 on www.secmgmt.com X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Here is my web.xml: Security Managment Consulting XmlRpcServlet org.apache.xmlrpc.webserver.XmlRpcServlet XmlRpcServlet /xmlrpc-status/* 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 status) { return SUCCESS; } } The following in the properties file: ChangeStatus=com.secmgmt.xmlrpc.picture.four.change_status.ChangeStatus My webapp deploys properly, and I never see an error in the logs anywhere when I hit it. My python program is: #!/usr/bin/python2 import xmlrpclib from pprint import pprint p = xmlrpclib.ServerProxy("http://192.168.1.15:8080/xmlrpc-status") print "Server created" try: #print p.system.listMethods() #print dir(p) p._ServerProxy__verbose = 1 print "Ping result: %s" % (p.ChangeStatus.ping()) except xmlrpclib.Error, v: print "ERROR", v pass print "Done" Here is the output: Server created connect: (192.168.1.15, 8080) send: 'POST /xmlrpc-status HTTP/1.0\r\nHost: 192.168.1.15:8080\r\nUser-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 111\r\n\r\n' send: "\n\nChangeStatus.ping\n< params>\n\n\n" reply: 'HTTP/1.1 302 Moved Temporarily\r\n' header: Server: Apache-Coyote/1.1 header: Location: http://192.168.1.15:8080/xmlrpc-status/ header: Date: Wed, 28 Oct 2009 19:47:50 GMT header: Connection: close ERROR Done Any idea why I get the 302 error? My XML-RPC appears to be correct. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org