I'm experimenting with Java-based configuration in Spring 3.0. So far I'm
finding it a mixed bag. One problem has been that there is no equivalent for
the domain-specific configuration though XML namespaces. Has anyone else
tried using @Bean to define JAX-WS endpoints and clients (as apposed to
using <jaxws:client/> or <jaxws:endpoint/>)? For example, I tried the
following endpoint without success...


import org.apache.cxf.Bus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.expd.service.person.impl.dao.IPersonDao;

@Configuration
public class PersonServiceConfiguration {
        
        @Autowired
        private Bus bus;

        @Autowired
        private PersonDao personDao;
        
        @Bean
        public Endpoint personServiceEndpoint() {               
                return new EndpointImpl(bus, personService(), "/PersonService");
        }

        @Bean
        public PersonService personService() {
                PersonServiceImpl service = new PersonServiceImpl();
                service.setDao(personDao);
                return service;
        }
}
-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Spring-3-0-Java-based-configuration-tp3299668p3299668.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to