Hi,
I'm using spring ApplicationContextAware to set the Application context to my web services endpoint. There's no exception when I install and start the bundle. When I'm trying to call the service, I'getting a null pointer exception as the application context is showing up as "null". Here's the app context entry :
And here's my sample code:Code:<jaxws:endpoint id="taxonomyquery" implementor="com.test.taxonomy.soap.query.service.TaxonomySoapQueryServiceImpl" address="/taxonomyquery" />
The service is starting without any issues, which prompted me to believe that the Application Context should have been set correctly.Code:@WebService(endpointInterface = "com.test.taxonomy.soap.query.service.ITaxonomySoapQueryService") public class TaxonomySoapQueryServiceImpl implements ITaxonomySoapQueryService, ApplicationContextAware { private static ApplicationContext ctx = null; private static Logger LOGGER = LoggerFactory.getLogger(TaxonomySoapQueryServiceImpl.class); @Override public void setApplicationContext(ApplicationContext ctx) throws BeansException { this.ctx = ctx; } public ProductReleaseResponse queryProductRelease(ProductReleaseRequest req) { ProductReleaseResponse response = new ProductReleaseResponse (); try { req.status = RequestHelper.transformStatus(req.status); ITaxonomySoapPluginQuery tp = (ITaxonomySoapPluginQuery) ctx.getBean("taxonomyQueryPlugin"); response = tp.queryProductRelease(req); } catch (Exception ex) { LOGGER.error(ex.getMessage()); response.status = "ERROR"; } return response; }
I've also tried using BeanfactoryAware, but got the same exception.
Any pointer will be appreciated.
- Thanks


