Service Virtualization

 View Only
  • 1.  Decode Binary Request (.bin) with IBM037 Encoding

    Posted Jul 21, 2020 11:09 AM
    Folks,

    i have a requirement to accept binary request over Https and send response in binary format . i would like  to decode the incoming request which is encoded with IBM037 .Please let me know how i can do the same.

    ------------------------------
    Regards
    Rahul V
    ------------------------------


  • 2.  RE: Decode Binary Request (.bin) with IBM037 Encoding
    Best Answer

    Posted Jul 22, 2020 03:07 AM
    Hi Rahul,

    You have to do this using scripting only. 

    Below is the sample for Base64 decode:

    import com.itko.lisa.remote.utils.Base64;

    message = testExec.getStateValue("fMLMssg");

    String encodedMessage = (String) Base64.encode( message.getBytes() );

    testExec.setStateValue("encodedMsg", encodedMessage); 

    return encodedMessage;


    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------