Hi all,

I have successfully created a few JAXWS endpoints, e.g.

        <jaxws:endpoint 
          id="helloWorld" 
          implementor="com.yahoo.cl.madness.api.impl.HelloWorldImpl" 
          address="/HelloWorld" />

Now I would like to inject some additional beans into the implementation
classes, for example a hibernate sessionfactory.

I tried using this in my service implementation class:

        @Autowired
        @Qualifier("dataAccess")
        private DataAccess dataAccess = null;

... but it just won't be set. The bean I am trying really does exist, but it
seems spring does not inspect the whole service implementation class at all. 

This is the beginning of the implementation class:

@WebService(endpointInterface = "com.yahoo.cl.madness.api.AccountService")
@Service
public class AccountServiceImpl implements AccountService
{
        private static Logger log = Logger.getLogger(AccountServiceImpl.class);
        
        @Autowired
        @Qualifier("dataAccess")
        private DataAccess dataAccess = null;
        ...

The web service itself works great, just all beans I am trying to inject are
not there. 

Is there an issue with using 
@WebService(endpointInterface = "com.yahoo.cl.madness.api.AccountService")
@Service
at the same time? I do not need to create a spring bean from the
implementation class, but I thought that way the dependencies might get
resolved. I also removed the @Service already (Web Services were still
exported by CXF) but did not work.

If annotation-based injection does not work, how would I otherwise inject
some beans into the implementation object?

Thanx,
Sven
-- 
View this message in context: 
http://www.nabble.com/Injecting-other-beans-into-service-implementation-tp18394692p18394692.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to