I am using XML-RPC plugin in Java to extract ticket information from Trac.
So far I am successful with the following code
config.setBasicUserName ("username");
config.setBasicPassword ("password");
config.setServerURL (new URL ("trac_url"));
client = new XmlRpcClient();
client.setConfig (config);
Object [] params = new Object [] {};
Object [] queryResult = null;
try {
queryResult = (Object []) client.execute ("ticket.query", params);
} catch (XmlRpcException e) {
System.out.println(e.getMessage());
System.out.println(e.code);
System.out.println(e.linkedException);
System.out.println(e.getCause());
e.printStackTrace();
}
but when i change url to another project then it just gives error messages
for your information the url is running fine when i use the very same url to open in a browser, i can see the tickets there, but it does not work in program
I get this for the above code
????????? XML_RPC ??????? // from System.out.println(e.getMessage());
1 // from System.out.println(e.code);
org.apache.xmlrpc.XmlRpcException: ????????? XML_RPC ???????
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
at xmlropx.ListTracTicket.extractDataFromTrac(ListTracTicket.java:206)
at xmlropx.ListTracTicket.main(ListTracTicket.java:263)
null // from System.out.println(e.linkedException);
null // from System.out.println(e.getCause());
please help me solve this