java.security.Security issue

Hi,
EAServer 4.2 build 42012 on NT (jdk13). This code works as a 
Java clientapp but not when the code is inside an EJB
in EAServer? Can we register Security provider dynamically?

// system var.
System.setProperty("javax.net.ssl.keyStore", "<val>"); 
System.setProperty("javax.net.ssl.keyStorePassword", "<val>"); 
System.setProperty("javax.net.ssl.trustStore", "<val>");
System.setPropert("javax.net.ssl.trustStorePassword","<val>"); 
System.setProperty("javax.net.debug", "all");
System.setProperty("https.proxyHost", "<val>");
System.setProperty("https.proxyPort", "<val>");
System.setProperty("java.protocol.handler.pkgs", "<val>");

// dynamically register sun's ssl provider
Security.addProvider(new Provider());
try {
      URL url = new URL(stringURL);
      if (url == null) {
        throw new java.rmi.RemoteException("A URL!");
      }

      // Create the SOAP connection and build the Call parameters
      SOAPHTTPConnection st = new SOAPHTTPConnection();
      call.setMethodName("getAllForms");
      call.setTargetObjectURI(targetObjectURI);
      call.setParams(params);
 
      // Invoke the method
      response = call.invoke(url, SOAPActionURI);
    }
    catch (Exception e) {
      e.printStackTrace();
    }
0
karljpersson
5/19/2003 2:36:29 PM
sybase.easerver.j2ee 2067 articles. 0 followers. Follow

2 Replies
1015 Views

Similar Articles

[PageSpeed] 55

Solved with classpath
set EAS_CLASSPATH_P1=%EAS_CLASSPATH_P1%;%JDK_LATEST%\jre\lib\jsse.jar
0
Remus
5/20/2003 9:47:53 AM
Remus you rules. Supertnx!
0
karljpersson
5/20/2003 9:48:49 AM
Reply: