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 [Axis2] SocketPermission exception while calling another webservice in WAS 5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "[Axis2] SocketPermission exception while calling another webservice in WAS 5.1" Watch "[Axis2] SocketPermission exception while calling another webservice in WAS 5.1" New topic
Author

[Axis2] SocketPermission exception while calling another webservice in WAS 5.1

Rajeevr Singh
Greenhorn

Joined: Aug 24, 2009
Posts: 2
Hi,

Hi,

I run Axis 1.3 project on WebSphere Platform 5.1 with JDK 1.4.2. Host Operating System is Linux.

I have two web services. I get SocketPermission error while the first service calls the next service. Both services are placed at the same jvm. I even tried to deploy these two services on two different jvm but I get the same error.

Same works fine in local Tomcat environment. I have proper policy entry for this in was.policy file.

Can it be related to port access rights?

I can see SimpleHTTPServer transportReceiver is set to 8080 in axis2.xml file. Do we need to change it to some other value? I don't have admin access to WAs so cannot comment on this.

Log trace is:
-------------------------
[8/24/09 2:34:47:667 EDT] 6c1dbeed SystemOut O Before calling partnerOutFLow Service
[8/24/09 2:34:47:758 EDT] 6c1dbeed SecurityManag W SECJ0314W: Current Java 2 Security policy reported a potential violation of Java 2 Security Permission. Please refer to Problem Determination Guide for further information.
Permission:
tools-dev.abc.com : access denied (java.net.SocketPermission tools-stage.abc.com resolve)
Code:
com.abc.ws.partnerService.PartnerService in {file:/opt/httpd/root/apps/wsx/ibm/ccx-dev-ear/wsx.war/WEB-INF/services/PartnerService/}
Stack Trace:
java.security.AccessControlException: access denied (java.net.SocketPermission tools-stage.abc.com resolve)


was.policy file:
--------------------------
grant codeBase "file:${application}"
{
permission java.lang.RuntimePermission "accessClassInPackage.sun.util.logging.resources";
permission java.io.FilePermission "${was.install.root}/properties", "read";
permission java.io.FilePermission "/opt/netegrity/siteminder/taiagent/TAI-1.0/config/ccxapp-dev-3", "read";
permission java.io.FilePermission "/opt/netegrity/siteminder/taiagent/TAI-1.0/config/ccxapp-stage-4", "read";
permission java.io.FilePermission "/opt/netegrity/siteminder/taiagent/TAI-1.0/config/ccxapp-stage-20", "read";
permission java.io.FilePermission "/opt/netegrity/siteminder/taiagent/TAI-1.0/config", "read";
permission java.lang.RuntimePermission "shutdownHooks";
permission java.net.SocketPermission "tools-dev.abc.com", "resolve,connect";
permission java.net.SocketPermission "tools-stage.abc.com", "connect,resolve";
};


Can someone give pointer to this problem?

Thanks in advance.

Regards,
Rajeev
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [Axis2] SocketPermission exception while calling another webservice in WAS 5.1