Hello there,
I'm just trying to authenticate within a servlet and therefore I'd like to call a webservice. For testing purposes i just added the webservice from the tutorial.
I registered my own servlet and security filter (as shown in the BahBah Chat demo code). Everything works fine till there. Within my servlet I want to invoke the webservice in order to check credientials....
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
res.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
res.setHeader("Pragma", "no-cache"); //HTTP 1.0
res.setDateHeader("Expires", 0); //prevents caching at the proxy server
String webserviceParam = req.getHeader("webserviceRequest");
...
StockQuoteServiceSoapWebServiceClient service = SERVICES.getService(StockQuoteServiceSoapWebServiceClient.class);
....
}
Unfortunately the SERVICES.getService() call always return null. Even when I want to lookup DB services (which I know they work when the application is started) are returning null.
Is this place - within a servlet - for a service lookup too early? And how could I possibly invoke a webservice at this point of time?
Thanks
Peter