Look up javadoc for java.lang.ClassLoader.getSystemResource() or
getSystemResourceAsStream().
Using this, you can have the file in your service's classpath, e.g.
axis/WEB-INF/classes/
Relative to this directory you can name the file
resources/newService/config.xml and get it using
ClassLoader.getSystemResourceAsStream("resources/newService/config.xml");
Jeff
Yariel Ramos Moreno wrote:
OK... why do I need the service name? Maybe you can give me another
solution...
I have a XML file into my service, exactly in the root, where there
are some configuration options for the service work. I most access
this file from the service classes to get this configuration
parameters. I'm using System.getProperty("user.dir") to step over the
tomcat directory, but next I have to concat to this path the rest of
the path to get the file:
/webapps/axis2/WEB-INF/services/newsService/config.xml. Is there
onother way to do this (get the path of an Axis2 web service from the
service code)?
Thanks again...
On 3/18/06, *Deepal Jayasinghe* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
hmm , it should work :-/
any at the init method what did you get as your service name , or was
the AxisServce null , if it is not null then you should be able to get
the name.