I'm trying to integrate T5 with jax-ws-commons
(https://jax-ws-commons.dev.java.net/spring/).
my web.xml is
<web-app>
<display-name>server Tapestry 5 Application</display-name>
<context-param>
<!-- The only significant configuration for Tapestry 5, this
informs Tapestry
of where to look for pages, components and mixins. -->
<param-name>tapestry.app-package</param-name>
<param-value>it.wingstech.gam3.server</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!--context-param>
<param-name>tapestry.use-external-spring-context</param-name>
<param-value>true</param-value>
</context-param-->
<filter>
<filter-name>app</filter-name>
<filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>app</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- these are for JAX-WS -->
<servlet>
<servlet-name>echoService</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>echoService</servlet-name>
<url-pattern>/ws/echoWS</url-pattern>
</servlet-mapping>
</web-app>
then into
AppModule#bind
I call
binder.bind(EchoService.class);
springApplication context is:
....
<wss:binding url="/ws/echoWS">
<wss:service><!-- nested bean is of course fine -->
<ws:service bean="#echoServiceWrapper">
<ws:handlers>
<ref bean="wsHandler" />
</ws:handlers>
</ws:service>
</wss:service>
</wss:binding>
<bean id="echoServiceWrapper"
class="it.wingstech.gam3.server.soap.EchoServiceWrapper">
</bean>
<bean id="wsHandler" class="it.wingstech.gam3.server.soap.WsHandler" />
....
finally EchoServiceWrapper.java is
package it.wingstech.gam3.server.soap;
import it.wingstech.gam3.server.services.EchoService;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import org.apache.tapestry5.ioc.annotations.Inject;
/**
* Canonical stock-quote web service.
* @author Kohsuke Kawaguchi
*/
@WebService(serviceName = "echoWS")
//@SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL,parameterStyle =
ParameterStyle.WRAPPED)
@SOAPBinding(style = Style.DOCUMENT, parameterStyle =
SOAPBinding.ParameterStyle.BARE)
public class EchoServiceWrapper
{
@Inject
private EchoService echoService;
public String echo(String value)
{
return echoService.echo(value);
}
}
-------------------------------------------------------------------------------------------------
debugging I see that echoService is null
so how can I do ? (in tapestry 5.1.0.4)
kiuma
On Fri, May 15, 2009 at 3:49 PM, Andrea Chiumenti <[email protected]> wrote:
> T 5.1.0.4
>
> On Fri, May 15, 2009 at 3:45 PM, Geoffrey Wiseman
> <[email protected]> wrote:
>> On Fri, May 15, 2009 at 9:37 AM, Andrea Chiumenti <[email protected]> wrote:
>>
>>> Hello, is it possible to inject T5 bound services into Spring beans
>>>
>>
>> I believe this is possible in 5.1.X but not 5.0.X -- what version are you
>> using?
>>
>> - Geoffrey
>> --
>> Geoffrey Wiseman
>> http://www.geoffreywiseman.ca/
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]