on 06-15-2007 9:32 AM
Hello,
I am currently struggling on implementing a java client, that is able to call an url via HTTPS.
HTTP URL calls are working fine, but HTTPs is not working.
I found already the piece of code, whis is missing, but I cannot implement until I have found the DCs from SAP_JEE or SAP_JTECHS, which contain the following classes.
- SecureConnectionFactory
- KeystoreManager
My piece of code for SSL Support:
// setup connection
serverURL = ApplicationProperties.getProperty("partminer.url.request");
if (null != serverURL && serverURL.startsWith("https")) {
InitialContext ctx = ctx = new InitialContext();
Object o = (Object) ctx.lookup("keystore");
KeystoreManager manager = (KeystoreManager) o;
KeyStore keyStore = manager.getKeystore("DEFAULT");
// Create factory
SecureConnectionFactory factory = new SecureConnectionFactory(keyStore, null);
// Create the HTTPS connection
con = factory.createURLConnection(serverURL);
} else {
URL url = new URL(serverURL);
con = (HttpURLConnection) url.openConnection();
}
Can anyone please let me know, which DC are to be used by my java client DC ?
Thank you,
Stefan
HI,
Have you solved your problem in accessing own ketstore-view (MYSTORE), please let me know the solution if you have solved.
KeyStore keyStore = manager.getKeystore("MYSTORE");
Caused by: java.rmi.RemoteException: com.sap.engine.services.keystore.exceptions.BaseRemoteException: Remote call errored
Caused by: com.sap.engine.services.keystore.exceptions.BaseKeystoreException: Application is not authorized to execute keystore operation [
Caused by: java.security.AccessControlException: access denied
Please advice.
Thanks
MMK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.