Using JAX-WS webservices with Spring 3.0.X on JBoss AS 7.1.X

前端 未结 2 713
花落未央
花落未央 2021-01-21 00:44

I have some problems deploying a JAX-WS webservice with Spring 3.0.6 on JBoss AS Final 7.1.1.

I have tried two first method from this tutorial: http://www.javacodegeeks.

2条回答
  •  盖世英雄少女心
    2021-01-21 01:00

    I am also having problems deploying JAX-WS with similiar configuration. Indeed using the SpringBeanAutowiringSupport as described in Spring doc chapter "19.5.5 Exposing servlet-based web services using JAX-WS" doesn't work as expected.

    See doc http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#remoting-web-services

    But you are wrong here trying to use SimpleJaxWsServiceExporter. Chapter "19.5.6 Exporting standalone web services using JAX-WS" of spring doc.

    This is making a conflict with web service that was was already registered by jboss.

    For prove try following configuration with updated port number application context:

    
       
    
    

    In final you will run with two services exposed

    http://localhost:8080/war-root/MyService?wsdl
    http://localhost:8081/MyService?wsdl
    

    As for now I found two workarounds proposed by other people:

    1. use org.springframework.beans.factory.config.AutowireCapableBeanFactory: Jax-ws, spring and SpringBeanAutowiringSupport
    2. move dependency injection to @PostConstruct method: JBoss 6 + Spring 3.0.5 + JAX-WS/CXF

    Both workarounds are working fine.

提交回复
热议问题