VuGen 12 generates wrong code for function lrapi.web.set_certificate_ex

  • KM01090301
  • 13-Aug-2014
  • 13-Aug-2014

Summary

VuGen 12 generates wrong code for function lrapi.web.set_certificate_ex. This issue prevents the script from compiling successfully. A workaround is provided to overcome the problem.

Error

After recording Java over HTTP script against web site that requests user certificate for authentication VuGen 12 generates wrong code for function lrapi.web.set_certificate_ex.

This issue prevents the script from compiling successfully.

Generated code is for example:

_webresult = lrapi.web.set_certificate_ex("CertFilePath=ccert_009.pem",
                                "CertFormat=PEM",
                                "KeyFilePath=ccert_009.pem",
                                "KeyFormat=PEM",
                                "Password=53d9de3f",
                                LAST});


But it should be:
_webresult = lrapi.web.set_certificate_ex(new String[] {"CertFilePath=ccert_008.pem",
                                "CertFormat=PEM",
                                "KeyFilePath=ccert_008.pem",
                                "KeyFormat=PEM",
                                "Password=53d9db90",
                                LAST});

Cause

Part of String class definition is missed.

Fix

To overcome the problem add

 "new String[] {"

 in place where it is shown in the example.

_webresult = lrapi.web.set_certificate_ex(new String[] {"CertFilePath=ccert_008.pem",
                                "CertFormat=PEM",
                                "KeyFilePath=ccert_008.pem",
                                "KeyFormat=PEM",
                                "Password=53d9db90",
                                LAST});


After that the script should compile successfully.