users@jax-rpc.java.net

RE: Spring 1.2.2 and JAXWS 2.0ea2

From: Brian Doyle <bdoyle_at_localmatters.com>
Date: Tue, 26 Jul 2005 09:25:21 -0600

I guess I don't understand how the JAXRPC "framework" knows about the
PatronEndpoint instance that was created by Spring. I understand how
spring creates the PatronEndpoint instance via the app context init, but
how do you tell the JAXRPCServlet to actually use that instance? Right
now the JAXRPC "framework" just creates an instance of the
PatronEndpoint and calls that. When I say the PatronEndpoing I'm
meaning the class that has the @WebService annotation. Thanks.

On Mon, 2005-07-25 at 14:29 -0700, Phillip A. Lindsay wrote:
> 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