This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

View direct through a web service question  RSS feed

 
fred petes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using Axis in Tomcat, how can I create a web service that can list the contents of a directory that is not in the webapp directory? Example: if my tomcat directory is c:\tomcat and the directory I want to list is d:\somedir.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uh... Just write a standard Javabean that uses the java.io classes to create a string that contains the directory listing you want and then wrap it as a Web Service.
Kyle
 
fred petes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a newbie. I'm not clear how to to do that. Please help!! I'm learning.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part are you not clear on? Writing the Javabean or wrapping it as a web service?
Kyle
 
fred petes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wrapping an app as a web service. I am using tomcat 4.1.12, which I've been told has changed its security setup. I am getting an access denied error.
Thanks
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you invoke any servlets or JSP's at all in your Tomcat instance? Or do you only get this error for the Axis servlet?
Kyle
 
fred petes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can invoke a servlets, JSP and doing a HelloWorld.jws file in Axis. If I have a jar file with preexisting classes, can I drop this jar file in the WEB-INF\lib directory and interface to the classes using a .jws file dropped in the web directory? Or do I need to extend the servlet class? I have a preexisting jar file that has classes that monitor a directory outside of the web directory. I want to use the classes within this jar file as a web service thru Axis.
Thanks
fred
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can build a .jws file that will interface to your classes if you put them on the Axis classpath. That should work fine.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!