Self-Solve Knowledge Search

Minimize Maximize
VuGen 12 generates wrong code for function lrapi.web.set_certificate_ex
Title :
VuGen 12 generates wrong code for function lrapi.web.set_certificate_ex
Document ID :
KM01090301
Product - Version:
performance center 12.00 ; loadrunner 12.00 ;
OS :
Updated :
Wed Aug 13 15:21:31 GMT 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.
Problem

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.