File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Policy File with AXIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Policy File with AXIS" Watch "Policy File with AXIS" New topic
Author

Policy File with AXIS

Mike Litherland
Ranch Hand

Joined: Aug 12, 2004
Posts: 31
Hi,

I'm deploying a web service that forwards messages it gets over SOAP to a JMS topic on a different machine. The code works when calling it not as a web service, but fails with permission issues when called from AXIS.

I think they key is to give it resolve,connect permissions in a policy file, but I'm not sure how to deploy a policy along with a class in Apache AXIS. The AXIS documentation is horribly lacking in many respects so I'm wondering if anybody here has familiarity with doing this. It has to be fairly common to use SOAP as a bridge to JMS, JDBC and other remote services.

Thanks,
Mike Litherland
Cleveland Clinic Foundation
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
If your AXIS service is running under Tomcat, the catalina.policy file is where you can specify that it has specific permissions. I went through this sort of thing trying to get a Tomcat servlet to talk to a JavaSpace. I ended up with this entry in catalina.policy:


Documentation on this sort of problem is indeed very hard to find. I found the _Professional Apache Tomcat 5_ book (Wrox press) to have the best summary.
Bill
Mike Litherland
Ranch Hand

Joined: Aug 12, 2004
Posts: 31
Bill - thanks for the helpful information. I'll be looking into picking up a copy of the book you recommended.

With a fresh eye after a good night's sleep I realized that I was missing two of the jar files needed for my JMS code to work properly. Once those were placed in the catalina lib directory things proceeded to work. Unfortunately, this was a case of me out looking for a problem and ignoring some of the basics.

Thanks again,
Mike
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
I went through exactly the same thing with JavaSpaces - there was no list of which jar file was essential for which function.
In desperation I just copied all the JARs that came with the toolkit into the ../shared/lib directory. I'm sure many of them are un-needed but which ones?
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Policy File with AXIS