CXF处理Date类型的俩种方式
1. CXF利用wsdl2java生成客户端时Date日期类型转换
http://cwfmaker.iteye.com/blog/1142835
2. GregorianCalendar cal = new GregorianCalendar();
cal.setTime(new Date());
XMLGregorianCalendar gc = null;
try {
gc = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
对象.setCreateTime(gc);
} catch (DatatypeConfigurationException e1) {
e1.printStackTrace();
}
posted on 2016-05-06 16:43 struggle_beiJing 阅读(491) 评论(0) 编辑 收藏 举报