解决:nor any of its super class is known to this context.
可以参考http://blog.csdn.net/chen_yu_ting/article/details/6606494
或者 http://learning.iteye.com/admin/blogs/1216342
一,遇到此问题是因为我直接把自定义对象放到ArrayList里面,然后返回这个ArrayList出的问题,提示说
class com.test.xxx nor any of its super class is known to this context. 按照上面连接里描述的 多创建了一个辅助类,把ArrayList封装在这个类中 返回这个封装类即可
上面是使用jdk自带的webservice api出的问题
?
二,如果是用CXF出现?nor any of its super class is known to this context,你需要指明集合里面存放的具体类型
比如说你调用webservice传的是List
1,
List list =new ArrayList();
list.add(对象A);
如果直接把list传过去就会出现以上问题
?
2,List<对象A> list =new ArrayList<对象A>();
list.add(对象A);
这样就OK了