2 weixin 37262060 weixin_37262060 于 2017.01.05 17:42 提问

为什么webservice注入业务层service 总是null

@Service("testWebServiceImpl")
@WebService(serviceName = "testWebService", name ="ITestWebService", portName = "TestWebServiceImplPort", targetNamespace = "http://webservice.move.com.his/")
public class TestWebServiceImpl extends SpringBeanAutowiringSupport implements ITestWebService {

@SuppressWarnings("unused")
private static Logger logger = Logger.getLogger(TestWebServiceImpl.class);

 @Autowired
 private static WSTemplate wsTemplate;
 @Autowired
 private static ITestServices testService;

@Override
public TestResponseTo testService(final TestRequestTo requestTo) {

    System.out.println(requestTo.toString());

    return wsTemplate.execute(requestTo, new WSCallback<TestResponseTo>() {

        public TestResponseTo doInOperation() throws WebServiceBusinessException {

            return testService.testService(requestTo);
        }
    });
}  

}

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!