Spring Service を SOAPHandler に注入しようとしていますが、参照は常に null です。
SpringBeanAutowiringSupport を拡張して使用してみました:
public class FuelServiceSOAPHandlerBase extends SpringBeanAutowiringSupport implements SOAPHandler<SOAPMessageContext>, InitializingBean {
@Autowired
private AuthenticationService authenticationService;
@Override
@PostConstruct
public void afterPropertiesSet() throws Exception {
LOG.info("AuthenticationHandler - PostConstruct");
SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
}
....
}
機能しません。authenticationService は常に null です。豆投げもやってみた
authenticationService = WebApplicationContextUtils.getWebApplicationContext(((HttpServletRequest)context.getMessage().getProperty(MessageContext.SERVLET_REQUEST)).getSession().getServletContext()).getBean(FuelAuthenticationService.class);
しかし、ServletRequest は null です。Webservice-Call throw SOAPUI を実行しています。
誰がエラーが何であるか知っていますか?
ありがとう