调试CXF的时候出现
javax.xml.ws.soap.SOAPFaultException: Marshalling Error: class XXX nor any of its super class is known to this context.
解决方式:
在WebService接口上添加:
@XmlSeeAlso({XXX.class})
缺点是在每个WebService接口上都要添加这个annotation, 不知道有没有更好的办法..
有的话回个贴..
补充:
在实体类上添加 @XmlType 解决UnmarshalException: unrecognized type name
参考文章:
http://www.javabeat.net/jaxb-exception-nor-any-of-its-super-class-is-known-to-this-context/
快照:
http://www.piaocafe.com/33961960/1386588138072482