I am using MIRTH to call to external API endpoint which is https. Since MIRTH doesn't inherently has capability to call to https, it throws ssl exception. I created a jar which will allow localhost to bypass ssl checking. Now I put that jar inside MirthConenct->custom-lib folder. Below is my jar's structure.
package Mirth.ssl;
public class TrustSSLCerts{
............. }
from Transformer's javascript writer I do
importPackage(Packages.Mirth.ssl.*);
foo() {
var ssl = new TrustSSLCerts();
}
On deploying channel and sending dummy data, it errors out-:
ReferenceError: "TrustSSLCerts" is not defined.
I am running MIRTH (2.2.1.5861). Any help regarding that is highly appreciated.
I found out that I need to call the class explicitly. I had to do below in order to have it working-:
var ssl = Packages.Mirth.ssl.TrustSSLCerts();
instead of
var ssl = TrustSSLCerts();