JBoss 6 + Spring 3.0.5 + JAX-WS/CXF

前端 未结 3 1682
南方客
南方客 2020-12-20 01:39

We\'ve got our project running on JBoss 6 with Spring 3.0.5. Everything went smooth until we tried to implement some Web Services with JAX-WS. If I try doing some simple WS

相关标签:
3条回答
  • 2020-12-20 01:55

    Ok, I've found a workaround. All we need to do is to move dependency injection to @PostConstruct method:

    @PostConstruct
    public void init() {
        SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
    }
    
    0 讨论(0)
  • 2020-12-20 01:55

    I hade same problem but on WebLogic and I have solved it as described here https://jira.springsource.org/browse/SPR-5652 .

    0 讨论(0)
  • 2020-12-20 02:04

    You should register your endpoint in your spring context using jaxws:endpoint, and refer to your bean using the implementor attribute. For example:

    <jaxws:endpoint id="NotificationImpl"
                    implementorClass="com.foo.ws.notification.NotificationImpl"
                    implementor="#notificationImpl"
                    serviceName="notification:Notification"
                    address="/notification"
                    xmlns:notification="http://notification.ws.foo.com">
    

    Endpoint implementation:

    @Component("notificationImpl")
    @WebService(endpointInterface="com.foo.ws.notification.Notification")
    public class NotificationImpl implements Notification  {
    
      @Autowired MessagingService messagingService = null;
    
      //...
    }
    
    0 讨论(0)
提交回复
热议问题