cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS call from adapter module

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

What about creating a Java mapping for this?

You could use a lookup with SOAP adapter. That could use HTTPS.

Answers (1)

Answers (1)

Former Member
0 Kudos

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