We are developing an MobileFirst Hybrid banking application. We implemented the encryption mechanism. All the request from the mobile client is encrypted and sent to the server and at the worklight adapter the request is dectypted using RSA. For this decryption process I have used an Java class which will do the decryption process. From my HTTP Adapter method I'm directly calling my Java class by passing my request as parameter like the following
function decryptRequest(param){
var result = com.myapp.Decrypt.decrypt(param);
WL.Logger.error("result "+result);
return {
result:result
};
}
The above thing is working fine on my standalone worklight server(on my desktop worklight server). The problem is when I put the Java class on my Worklight Liberty profile server(which is my UAT box) I'm getting an error
[ERROR ] FWLSE0099E: An error occurred while invoking procedure [project MYApp]BusinessAdapter/parseReqestFWLSE0100E: parameters: [project MYApp] TypeError: Cannot call property decrypt in object [JavaPackage com.myapp.Decrypt]. It is not a function, it is "object".
I have my Java class(on worklight studio) under server/java/com/myapp/Decrypt. When I take MYApp.war and check the war file has my java class "Decrypt" under "MYApp.war\WEB-INF\classes\com\myapp\Decrypt.class". I updated the "MYApp.war" file on my worklight Liberty server(my UAT server), but even then I'm getting the above error. Can anyone please tell me did I miss anything to do. Should I do anything more to make my HTTP Adapter to call the Java Decrypt class method.
Any help would be greatly appreciated. Please some one help in solving this problem as it is now become a show stopper for my UAT phase1 testing.
Thanks in advance