Hi,

I am new to XFire and I am in the process of implementing my first web-service using XFire. I followed the example http://xfire.codehaus.org/Quick+Start and everything works so far. But in my "real project" I need a way to get the absolute path of a certain directory in the webapp-container (as I got it the BookService runs in a Servlet provided by xfire).
In "normal" servlets I can get the path by just calling:
ServletContext servletContext = getServletContext();
String abspath=servletContext.getRealPath("/testdata");
Now e.g. let's say I want to do this in the constructor of BookServiceImpl? How can I do that? I found out that org.codehaus.xfire.transport.http.XFireServlet has got a method getWebappBase which seems similar. But how can I access it as BookServiceImpl does not extend this class (and if I try it I get errors in runtime)?

I would appreciate any help!

Best,

Hendrik


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to