on 02-09-2009 11:31 AM
Hello,
we want to execute an HTTPS call (SOAP) to an external system from within an adapter module chain (probably FTP sender).I have some sample code (below) for XI, but am not sure if that is suitable because:
1) the SSL properties are set via System.setProperty. Doesn't that disturb other HTTPS connections on XI ? Because System.setProperty() is global for the JVM
2) the client.getPath() is a file path (client is of type File). I do not want to use a file path, but only refer to keystore views and and entries if possible. I would import the needed certificates into the XI Java keystore with the Visual Admin, and then refer to these entries. Similar to how Elster is doing it.
Anyone knows what is the correct implementation in XI for doing an HTTPS call within the context of an adapter module session bean? We have several truststores, e.g. for Elster, and I do not want to disturb them. For example, how are the Elster modules doing that internally ? I would then do it the same way.
Here is the sample source:
// Set the trusted store as Java system property
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", CASTORE);
System.setProperty("javax.net.ssl.trustStorePassword", CASTORE_PWD);
// Set SSL client certificate as Java system property
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStore", client.getPath());
System.setProperty("javax.net.ssl.keyStorePassword", pwd);
// Set SSL as Java system property
System.setProperty("java.protocol.handler.pkgs", "javax.net.ssl");
// Create HttpsURLConnection
URL url = new URL(urlIn);
HttpsURLConnection con = (HttpsURLConnection)url.openConnection();
CSY
What about creating a Java mapping for this?
You could use a lookup with SOAP adapter. That could use HTTPS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could I just add an XISoapAdapterBean into the module chain of the FTP sender adapter ? How would I configure the complete parameters for that bean ? Normally the XISoapAdapterBean is used in a SOAP receiver CC, where you add URL and so on in the GUI.
Btw, the SOAP is call used to validate a signed invoice XML. The invoice is received via FTP.
CSY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
26 | |
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.