Spring不会用JAX-WSWebService端点自动连接bean

Spring不会用JAX-WSWebService端点自动连接bean,spring,jax-ws,autowired,Spring,Jax Ws,Autowired,我正在尝试使用我编写的JAX-WSWebService。对于spring自动连接的带注释bean,我总是得到nullPointerException。然而,在服务器端的web上,一切都可以正常工作,但是通过JAX-WSWebService访问bean 我尝试过扩展SpringBeanAutowiringSupport,但仍然没有成功。我怎样才能做到这一点 关于Rohit,我没有扩展SpringBeanAutowiringSupport的经验,但成功地使用了这种方法: 以以下方式注释webServ

我正在尝试使用我编写的JAX-WSWebService。对于spring自动连接的带注释bean,我总是得到
nullPointerException
。然而,在服务器端的web上,一切都可以正常工作,但是通过JAX-WSWebService访问bean

我尝试过扩展SpringBeanAutowiringSupport,但仍然没有成功。我怎样才能做到这一点


关于Rohit,我没有扩展SpringBeanAutowiringSupport的经验,但成功地使用了这种方法:

  • 以以下方式注释webService类:

    @Component("yourWebService")  
    @WebService(endpointInterface ="your.package.YourServicePort")
    
  • 为webService创建新的spring上下文xml并定义JAX-WS端点:

    <jaxws:endpoint
        id="yourServiceEndpoint"
        implementor="#yourWebService"
        address="${yourWebService.wsdl.url}"> //load url from properties file
    </jaxws:endpoint>       
    


  • 使用这种方法,我成功地将JAX与Spring一起使用

    我没有扩展SpringBeanAutowiringSupport的经验,但成功地使用了这种方法:

  • 以以下方式注释webService类:

    @Component("yourWebService")  
    @WebService(endpointInterface ="your.package.YourServicePort")
    
  • 为webService创建新的spring上下文xml并定义JAX-WS端点:

    <jaxws:endpoint
        id="yourServiceEndpoint"
        implementor="#yourWebService"
        address="${yourWebService.wsdl.url}"> //load url from properties file
    </jaxws:endpoint>       
    


  • 使用这种方法,我成功地将JAX与Spring结合使用

    在自动连接webService类时,是否会在webService类中获取空对象?或者您在其他地方自动连接的webservice得到null?在自动连接webservice类时,您在webservice类中得到null对象吗?或者你在其他地方自动连线的webservice得到空值?我面临同样的问题。我已经有了@Component(“TransactionImpl”)@WebService公共接口事务{我面临着同样的问题。我已经有了@Component(“TransactionImpl”)@WebService公共接口事务,我也给了@Component(“TransactionImpl”)@WebService公共接口事务{