M
mgalaty
Hello,
I am getting an error "XML-RPC - java.lang.ClassCastException:
java.util.Date" when I call the "XmlRpcClient" execute method. I
believe the underlying classes are having trouble parsing the result
from the time.xmlrpc.com/RPC2:80 XML-RPC service.
I apologize that I could not navigate the Apache bug reporting and
search system. I hope someone can recognize what is up with this.
Thank you in advance for any help,
Michael
import java.util.Vector;
import java.util.Hashtable;
import org.apache.xmlrpc.*;
public class GetTime {
private final static String server_url
="http://time.xmlrpc.com/RPC2";
public static void main (String [] args) {
try {
XmlRpcClient server = new XmlRpcClient(server_url);
Vector params = new Vector();
System.out.println("Calling execute method ");
Hashtable response = new Hashtable();
response = (Hashtable)
server.execute("currentTime.getCurrentTime",params);
System.out.println("Time is: ");
} catch (XmlRpcException exception) {
System.err.println("GetTime1: XML-RPC Fault #" +
Integer.toString(exception.code) + ": " + exception.toString());
} catch (Exception exception) {
System.err.println("GetTime2: " + exception.toString());
}
}
}
Note: This is similar to this post, but NOT the same.
http://groups.google.com/groups?hl=...04081102.10e66eb4%40posting.google.com&rnum=1
I am getting an error "XML-RPC - java.lang.ClassCastException:
java.util.Date" when I call the "XmlRpcClient" execute method. I
believe the underlying classes are having trouble parsing the result
from the time.xmlrpc.com/RPC2:80 XML-RPC service.
I apologize that I could not navigate the Apache bug reporting and
search system. I hope someone can recognize what is up with this.
Thank you in advance for any help,
Michael
import java.util.Vector;
import java.util.Hashtable;
import org.apache.xmlrpc.*;
public class GetTime {
private final static String server_url
="http://time.xmlrpc.com/RPC2";
public static void main (String [] args) {
try {
XmlRpcClient server = new XmlRpcClient(server_url);
Vector params = new Vector();
System.out.println("Calling execute method ");
Hashtable response = new Hashtable();
response = (Hashtable)
server.execute("currentTime.getCurrentTime",params);
System.out.println("Time is: ");
} catch (XmlRpcException exception) {
System.err.println("GetTime1: XML-RPC Fault #" +
Integer.toString(exception.code) + ": " + exception.toString());
} catch (Exception exception) {
System.err.println("GetTime2: " + exception.toString());
}
}
}
Note: This is similar to this post, but NOT the same.
http://groups.google.com/groups?hl=...04081102.10e66eb4%40posting.google.com&rnum=1