Hi Dan,

Just a thought - I know it's an FAQ when Axis is used with Tomcat so it might just be 
relevant here - is it a problem with your XML libraries? Too many versions of 
xerces.jar, perhaps?

The J2EE RI should come with its own JAX* and DOM APIs included, so maybe you will not 
be allowed to load (for example) org.w3c.dom.* from within the application 
classloader, if it is already available from the system classloader ...

I doubt that signing the jar files would have any effect.
Amending the security policy is a possibility.

Try dropping xerces.jar and anything else XML-related and see how it goes.

Hope this helps
Keith


-----Original Message-----
From: Dan Cieslak [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 04:57
To: [EMAIL PROTECTED]
Subject: EJB Consuming a Web Service


Hi all!  Sorry for the re-post; I haven't seen any
responses....

I just started using Axis and am quite pleased with it
so far.  I've written a WebService in .NET and used Axis
to generate Java Class files to consume it.  Everything
works really great until I tried to have a JMS MessageBean
make the SOAP call.  I'm running Sun's J2EE RI and am
getting the following message:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
        at
java.security.AccessController.checkPermission(AccessController.java:394)
... [SNIPPING A BUNCH OF THE STACK TRACE] ...
        at
org.apache.axis.client.Service.getEngineConfiguration(Service.java:731)
        at org.apache.axis.client.Service.getAxisClient(Service.java:140)
        at org.apache.axis.client.Service.<init>(Service.java:149)
        at
cieslak.ws.client.ClearinghouseServiceLocator.<init>(ClearinghouseServiceLocator.java:10)
... [ETC STACK TRACE] ...
        at
cieslak.ejb.consumers.NewOrderConsumer.onMessage(NewOrderConsumer.java:60)
        at
com.sun.ejb.containers.MessageBeanContainer.onMessage(MessageBeanContainer.java:653)

Where ws.client.ClearinghouseServiceLocator is the WSDL2Java
generated code and NewOrderConsumer is the MessageBean.

I've found a lot through Google about making EJBs accessible
as WebServices, just not a lot about EJBs consuming a WebService.

I've tried the following:
1. (Self) Signing the axis jar files (axis.jar,
    commons-discovery.jar, commons-logging.jar, saaj.jar and
    jaxrpc.jar)
2. Altering j2ee/j2sdk1.3.1/lib/security/client.policy and
   server.policy to include lines like:
      grant codeBase "file:/usr/local/axis-1_1RC1/lib/axis.jar" {
            permission java.security.AllPermission;
      };
   For each of the jars listed in #1

Thanks in advance.
-Dan Cieslak







_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

Reply via email to