users@jax-rpc.java.net

RE: Spring 1.2.2 and JAXWS 2.0ea2

From: Phillip A. Lindsay <phil_at_lindsay.net>
Date: Mon, 25 Jul 2005 14:37:56 -0700

Sorry forgot to mention:
        In the JAXWS webapp web.xml, I used the spring listener to init the
spring environment:
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:applicationContext.xml</param-value>
  </context-param>
  <listener>
 
<listener-class>org.springframework.web.context.ContextLoaderListener</liste
ner-class>
  </listener>

-phil



> -----Original Message-----
> From: Phillip A. Lindsay [mailto:phil_at_lindsay.net]
> Sent: Monday, July 25, 2005 2:29 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: Spring 1.2.2 and JAXWS 2.0ea2
>
> Brian,
> Thanks for the info, I got something a littler simpler to
> work with a static setter. Create a static setter for Service
> interface on endpoint implementation; Then let the init of
> bean context set the implementation per application context.
> .e.g.:
> <beans>
> <bean id ="patronService"
> class="com.foobar.patron.service.PatronServiceImpl"
> autowire="byType"/>
> <bean id ="patronEndpoint"
> class="com.foobar.patron.ws.PatronEndpoint">
> <property name="patronService"><ref
> bean="patronService"/></property>
> </bean>
> </beans>
>
> Since the application context init creates an instance of
> PatronEndpoint, the static property "PatronService" is
> automagically injected by Spring via static setter.
>
> Cheers,
> -phil
>
> > -----Original Message-----
> > From: Brian Doyle [mailto:bdoyle_at_localmatters.com]
> > Sent: Thursday, July 21, 2005 4:45 PM
> > To: users_at_jax-rpc.dev.java.net
> > Subject: Re: Spring 1.2.2 and JAXWS 2.0ea2
> >
> > I just hacked it in an ugly solution by doing two things:
> >
> > 1. Created a static setter for the service impl on the jax
> annotated
> > class and did not mark it as a @WebMethod
> >
> > 2. Subclassed the JAXRPCServlet and overwrote the init() method.
> > The init() method gets the spring context and calls the
> static setter
> > on the annotated class with the service impl.
> >
> > Not pretty but it works. Hopefully someone has a better solution.
> >
> > On Thu, 2005-07-21 at 16:09 -0700, Phillip A. Lindsay wrote:
> > > Has anyone tackled the problem of injecting a service impl into a
> > > jaxws annotated implementation?
> > > I think I might be able to do something with handler
> framework, but
> > > hope someone figured this out already?
> > > Thanks,
> > > -phil
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>