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)