Integrating JAX-WS with Tapestry

谁说胖子不能爱 提交于 2019-12-13 04:38:32

问题


I have experimented with Derkoe's code that integrates JAX-WS services with Tapestry's. Tapestry is a web and DI (i.e. Dependency Injection) framework.

The code works great but I couldn't fully use all JAX-WS features.

Tapestry's IoC creates a proxy for my web services, and thus doesn't honor JAX-WS annotations. And JAX-WS context listener, doesn't of course honor Tapestry's configuration for my service, so it won't perform any DI.

So I can either operate my Tapestry services, without JAX-WS full support, only web methods will be called,

Or

I can use JAX-WS full support, but none of the DI support.

So how can I integrate JAX-WS with Tapestry's IoC ? This is mainly a JAX-WS question.

  • How can I extend\modify, how JAX-WS create services ?

As far as I have reached, I should replace this class (InstanceResolver). But how ? I can't find a clear answer.

I can't use any other framework. Only JAX-WS and Tapestry.


回答1:


Found it :)

In Derkoe's ServiceInvoker class. The method start is empty. Just put that line in it:

ResourceInjector.STANDALONE.inject(wsc, service);

I borrowed it from the com.sun.xml.ws.server.SingletonResolver<T> class.



来源:https://stackoverflow.com/questions/18548965/integrating-jax-ws-with-tapestry

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!