错误 Could not parse xs:dateTime: Format.parseObject(String) failed
发布日期:2021-11-04 22:04:00 浏览次数:3 分类:技术文章

本文共 904 字,大约阅读时间需要 3 分钟。

xfire作为webService客户端开发框架时,采用日期格式会碰到日期格式化异常。 如下。  

解决方法:检查服务器端Module的日期类型,将其改成java.util.Date   

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not parse xs:dateTime: Format.parseObject(String) failed

org.codehaus.xfire.fault.XFireFault: Could not parse xs:dateTime: Format.parseObject(String) failed

at org.codehaus.xfire.aegis.type.basic.CalendarType.readObject(CalendarType.java:34)

 

注:    

java.util.Date 是 java.sql.Date 的父类(注意拼写) 

 

转换关系是

java.sql.Date date=new Java.sql.Date();
java.util.Date d=new java.util.Date (date.getTime());
反过来是一样的 

org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not parse xs:dateTime: Format.parseObject(String) failed
org.codehaus.xfire.fault.XFireFault: Could not parse xs:dateTime: Format.parseObject(String) failed

转载地址:https://blog.csdn.net/xiaochangwei789/article/details/7703166 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:xfire整合spring时引入的servlet
下一篇:The prefix "mvc" for element "mvc:annotation-driven" is not bound 的解决方法

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年04月04日 08时23分07秒