【发布时间】:2011-12-07 16:43:14
【问题描述】:
我正在开发一个小网络服务,但遇到了一个我不明白的细节。
这是我的服务端点接口的一部分:
@WebService
public interface ScriptStarterInterface {
String getResult(@WebParam(name="newFile") FileContainer newFile);
}
它也有一个实现。 ;)
现在当我启动服务器时,出现以下异常:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
some.package.FileContainer does not have a no-arg default constructor.
我将无参数构造函数添加到 FileContainer,现在一切正常。我不明白的是:我为什么要提供这个构造函数?
我偶然发现的所有甲骨文页面都只是说我必须提供一个,但从来没有为什么。 :(
【问题讨论】:
标签: web-services jax-ws cxf