client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
// set configuration
client.setConfig(config);
ClientFactory factory = new ClientFactory(client);
CalendarWidget calendar = (CalendarWidget) factory.newInstance(CalendarWidget.class);
int year=2005, month=11, day=13;
// make proxied calls
System.out.println("Weekday("+year+","+month+","+day+") = "+ calendar.getWeekday(year, month, day));
System.out.println("isBusinessDay("+year+","+month+","+day+") = "+ calendar.isBusinessDay(year, month, day));
}