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 = context.getRealPath("/");
regards Tom
Am 06.12.2011 13:32, schrieb Kishanthan Thangarajah:
> Hi Denise,
>
> On Tue, Aug 2, 2011 at 8:03 PM, Denise Wu <[email protected]> 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 access the file by using
> getResourceAsStream("path/to/file") to read the file at run time.
>
> Hope this helps.
>
> Thanks,
> Kishanthan.
>>
>> Thank you.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Für's private
http://toms-toy.de/thomas%20grabietz%[email protected]%20(0xE43515AC)%20pub.asc
GIT d-(---)? s():()> a+ C$>++ UL$>+ P? L>++ E W>+++ N>++$ o K--? w>--- O
M>-- V PS>+ PE Y PGP>++$ t 5 X R tv b>+++ DI D G e> h>++ !r y>+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]