Re: How to read file from META-INF

2011-12-06 Thread Thomas Grabietz
Hi Denise, maybe you need the absolut path to open the file: MessageContext msgContext = MessageContext.getCurrentMessageContext(); ServletContext context = ((HttpServlet) msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext(); String path = con

Re: How to read file from META-INF

2011-12-06 Thread Kishanthan Thangarajah
Hi Denise, On Tue, Aug 2, 2011 at 8:03 PM, Denise Wu wrote: > Hi, > > I have a "mySchema.xsd" located in the META-INF directory in the > webservice archive file myService.aar. > I would like to read this file "mySchema.xsd" in my webservice class. > How to access it at runtime? I think you can a

Re: How to read file from META-INF

2011-08-05 Thread Denise Wu
Nothing worked, I finally copied my xsd file into the 'classes' directory that contain the service implementation classes, and then read the xsd file using the following code from my service 'implementation class': InputStream input = getClass().getResourceAsStream("BookReservation.xsd");

Re: How to read file from META-INF

2011-08-04 Thread Deepal Jayasinghe
Have a look at the following: http://wso2.org/library/259 Thanks, Deepal > Hi, > > I tries all combinations using the getResource in calssloader but it's > not working. > Can you point to a sample code example please? > > Many thanks > > > > On Tue, Aug 2, 2011 at 4:24 PM, Deepal Jayasinghe wrote

Re: How to read file from META-INF

2011-08-04 Thread Denise Wu
Hi, I tries all combinations using the getResource in calssloader but it's not working. Can you point to a sample code example please? Many thanks On Tue, Aug 2, 2011 at 4:24 PM, Deepal Jayasinghe wrote: > You can get the class loader  and read the file using getResource as > stream. Once you

Re: How to read file from META-INF

2011-08-02 Thread Deepal Jayasinghe
You can get the class loader and read the file using getResource as stream. Once you ask for the class loader it will give you the class loader that Axis2 has used to load the your service class. Thanks. Deepal On Tue, Aug 2, 2011 at 10:33 AM, Denise Wu wrote: > Hi, > > I have a "mySchema.xsd"