1
我正在尝试创建一个动态代理,将围绕Web服务包装EJB,因为应用程序服务器不支持在没有专有路由器项目生成的情况下创建基于EJB的Web服务。如何将注释添加到Java中的动态代理类中?
我的想法是创建一个动态代理,以及一些如何使用InitServlet启动它。现在我有点不明白如何动态设置注释,以免出现以下错误。
class $Proxy0 has neither @WebSerivce nor @WebServiceProvider annotation
at com.sun.xml.internal.ws.server.EndpointFactory.verifyImplementorClass(EndpointFactory.java:277)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.getPrimaryWsdl(EndpointImpl.java:273)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:213)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:143)