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();
}