Opened 13 years ago

Closed 9 years ago

#7041 closed defect (fixed)

XML-RPC access to disabled (forbidden access)

Reported by: egavaldo Owned by: osimons
Priority: low Component: XmlRpcPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11


Hi there, Not sure this is the right place to post this. when I'm trying to use the XML-RPC plugin via my Java client (and the example library provided), I'm always getting this exception:

	at $Proxy0.query(Unknown Source)
	at com.xqual.xstudio.sql.external_bugtracking.trac_0_11_x.CStudioXmlRpcTrac_0_11_x_Engine.<init>(
	at com.xqual.xstudio.sql.external_bugtracking.trac_0_11_x.CStudioXmlRpcTrac_0_11_x_Engine.main(
Caused by: org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned unexpected status: Forbidden
	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.getInputStream(
	at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(
	at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(
	at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(

however, my code is pretty simple and should be correct:

	    try {
		    xmlRpcClientConfig = new XmlRpcClientConfigImpl();
			xmlRpcClientConfig.setServerURL(new URL(""));
			xmlRpcClientConfig.setBasicPassword("<my password>");
			//xmlRpcClientConfig.setConnectionTimeout(60 * 1000);
			//xmlRpcClientConfig.setReplyTimeout(60 * 1000);
			//xmlRpcClientConfig.setEnabledForExtensions(true); // ?

		    xmlRpcClient = new XmlRpcClient();
			//xmlRpcClient.setTransportFactory(new XmlRpcCommonsTransportFactory(xmlRpcClient)); //?

			xmlRpcProxy = new TrackerDynamicProxy(xmlRpcClient);
		} catch (MalformedURLException e) {

		System.out.println("about to execute a command...");

		// get some information !!!
        Ticket ticket = (Ticket)xmlRpcProxy.newInstance(Ticket.class);

        try {
			//Vector vector = ticket.getTicketFields();
        	//Vector vector = ticket.get(new Integer(5896));
        	Vector vector = ticket.query(); //owner=egavaldo

			System.out.println("- - - - - result = " + vector);
		} catch (Exception e) {

This sniplet should connect to the TRAC live instance ( with my own credentials... but it looks there are some rights problems. Any help? Many thanks in advance, Eg

Attachments (0)

Change History (4)

comment:1 Changed 13 years ago by osimons

Priority: highlow
Summary: forbidden accessXML-RPC access to disabled (forbidden access)

Yes, it should. But it won't as you and everyone else don't actually have permission to use XML-RPC at anymore. Try login/xmlrpc using your credentials to verify that.

This Trac is currently running old 0.10.x, and the XmlRpcPlugin code from that era does not play nicely with things like spam filter and so on. As an endless stream of test & spam tickets and wiki edits arrived, we saw no other good solution than to disable RPC access. It will return once the site gets updated to Trac 0.11.x or later, and using the latest XmlRpcPlugin version.

I've renamed the summary and will keep the ticket open as a reminder.

comment:2 Changed 13 years ago by egavaldo

Ok, thank you very much. I'll install Trac somewhere to test my code then. Thanks, Eg

comment:3 Changed 9 years ago by Olemis Lang

Resolution: fixed
Status: newclosed

This is working now , see . Unless I am missing something this ticket should be closed .

comment:4 Changed 9 years ago by Olemis Lang

Resolution: fixed
Status: newclosed

This is working now , see . Unless I am missing something this ticket should be closed .

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.