分类:
2008-04-11 19:32:23
![]() |
|
import java.lang.reflect.Proxy;
import org.codehaus.xfire.client.Client;
import org.codehaus.xfire.client.XFireProxy;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;
import org.codehaus.xfire.transport.http.CommonsHttpMessageSender;
public class Getds {
private static final String SERVICE_URL="";
public String[][] getClickedByATs(String startDate, String endDate, String[] ATs){
String[][] datas = null;
Service serviceModel = new ObjectServiceFactory().create(CommonDataQuery.class, null,"", null);
XFireProxyFactory serviceFactory = new XFireProxyFactory();
try {
CommonDataQuery service = (CommonDataQuery) serviceFactory.create(serviceModel, SERVICE_URL);
Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient();
client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED,Boolean.FALSE);
client.setProperty(CommonsHttpMessageSender.HTTP_TIMEOUT, "0");
datas = service.getClickedByATs(startDate, endDate, ATs);
} catch (Exception e) {
e.printStackTrace();
}
return datas;
}
public static void main(String[] args) {
Getds obj=new Getds();
String startDate = "2008-01-20";
String endDate = "2008-01-20";
String[] ATs = null;
String[] IDs = null;
long begin = System.currentTimeMillis();
String[][] datas = obj.getClickedByATs(startDate, endDate, ATs);
//String[][] datas = obj.getPageviewByIDs(startDate, endDate, ATs);
if(datas!=null){
System.out.println("日期\tKeyID\t流量");
for(int i=0;i
}
}else{
System.out.println("没有数据!");
}
System.out.println("结束!!!!!");
long end = System.currentTimeMillis();
System.out.println(end - begin);
}
}