将JAX-WS与Tapestry集成 [英] Integrating JAX-WS with Tapestry
问题描述
我已经尝试过 Derkoe的代码将JAX-WS
服务与Tapestry的服务集成的a>. Tapestry是一个Web和DI(即依赖注入)框架.
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.
该代码很好用,但是我无法完全使用所有JAX-WS功能.
Tapestry的IoC为我的Web服务创建了一个代理,因此不支持JAX-WS注释. 而且JAX-WS上下文侦听器当然不支持Tapestry的服务配置,因此它不会执行任何DI.
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.
因此,在没有JAX-WS完全支持的情况下,我可以操作我的Tapestry服务,只会调用Web方法,
So I can either operate my Tapestry services, without JAX-WS full support, only web methods will be called,
或
我可以使用JAX-WS的完全支持,但不能使用任何DI支持.
I can use JAX-WS full support, but none of the DI support.
那么如何将JAX-WS与Tapestry的IoC集成?这主要是一个JAX-WS问题.
So how can I integrate JAX-WS with Tapestry's IoC ? This is mainly a JAX-WS question.
- 如何扩展/修改JAX-WS如何创建服务?
As far as I have reached, I should replace this class (InstanceResolver). But how ? I can't find a clear answer.
我不能使用任何其他框架.只有JAX-WS和Tapestry.
I can't use any other framework. Only JAX-WS and Tapestry.
推荐答案
找到了:)
在Derkoe的ServiceInvoker
类中.方法start
为空.只需在其中添加一行:
In Derkoe's ServiceInvoker
class. The method start
is empty. Just put that line in it:
ResourceInjector.STANDALONE.inject(wsc, service);
我是从com.sun.xml.ws.server.SingletonResolver<T>
类中借来的.
这篇关于将JAX-WS与Tapestry集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!