Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to locate local files for a Web Service

 
Oliver Naumann
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm new to web services but already managed to set up a simple HelloWorld-WebService.

Now I wanted to try something more difficult by converting a project of mine into a WebService. During the execution, the program reads from a local file via using Java File (mostly it reads xsd files for xml validation). This works well locally but as soon as I convert the project into a web service, I get a FileNotFound exception when I call it. My problem is that I don't know where to locate my files from which I want to read. I tried a lot of locations including WEB-INF and the classes folder.

Where in my WAR-File do the files have to be so that I can read from them? Do I have to specify anything in sun-jaxws.xml or web.xml?

I am using JAX-WS and am deploying on a tomcat server.

Just tell me if you need any more information.
 
Kesava Krishna
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If files are secured then please put them under classes folder and try to read from the code.
Note :- Are these files doesn't change over a period.

Thanks,
Kesava
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!