AnsweredAssumed Answered

Issue in base64 decoding.

Question asked by Uttamvn on Jan 21, 2016
Latest reply on Jan 25, 2016 by MarcyNunns

Hi All,

 

I have a Java code (shown below) which decodes the Base64 format messages. This piece of code used to work fine in LISA_7.5 version however, it is giving back weird response in DevTest_8.5. We have currently migrated to DevTest_8.5 from LISA_7.5.

 

Code:

import com.itko.lisa.test.TestEvent;

import com.itko.util.*;

 

if(testExec.getStateValue("SigRoute_Decode")!=null)

{

    byte[] decodedString = com.itko.util.Base64.decode(testExec.getStateValue("SigRoute_Decode")); //SigRoute_Decode=H4sIAAAAAAAAAAtJLS4BADLRTXgEAAAA

    decodedXML = new String(decodedString);

    testExec.setStateValue("Decoded_POSResponse", decodedXML);

    return  "Decoded Payload: " + testExec.getStateValue("Decoded_POSResponse");

}

else

{

    testExec.setStateValue("Decoded_POSResponse","");

}

 

Response:

Thanks,

Uttam.

Outcomes