Service Virtualization

Expand all | Collapse all

how to disable encoding on VSE server.

  • 1.  how to disable encoding on VSE server.

    Posted Nov 29, 2017 08:07 AM

    we are trying to read message from IBM MQ but the messages are in encoded format.



  • 2.  Re: how to disable encoding on VSE server.
    Best Answer

    Broadcom Employee
    Posted Nov 29, 2017 02:24 PM

    You might need to use a Scriptable DPH to decode the message.

     

    Documentation on scriptable DPH is available at Scriptable Data Protocol - DevTest Solutions - 10.1 - CA Technologies Documentation.

     

    Ulrich Vogt shared scripting guide, please refer DevTest 8.0 - Scripting Guide - V1.1.pdf 

     

    Thanks,

    Prema



  • 3.  Re: how to disable encoding on VSE server.

    Broadcom Employee
    Posted Nov 29, 2017 02:57 PM

    You'll need to know what character encoding the sender is using.  If it's not readable at this point, it's certainly not ASCII or Unicode.  Any chance the document is EBCDIC encoded copybook?

     

    --Mike



  • 4.  Re: how to disable encoding on VSE server.

    Posted Nov 30, 2017 04:11 AM

    Thanks for the input.

    Actual issue is that application is sending the message in text format but VSE is converting that to encoded format.

    we have tested in ITR mode in our local machine and we can see the message in text format.

    but when we deploy the VSM on VSE server we see VSE is encoding the messages.

    is there any configration setting in VSE where we can disable the encoding.



  • 5.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 05:54 AM
    I am facing the same problem. Please suggest solution if you have.


  • 6.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 06:04 AM
    Edited by Vaibhav Jain Jul 07, 2020 06:05 AM
    Hi Pradeep,

    Are you able to identify the encoding type in the message?

    Also, have you created the virtual service using R-R pair or recording? What encoding was selected at that time.

    Thanks.

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



  • 7.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 06:10 AM
    The encoding type is base64. 
    Service is created using RR pair.


  • 8.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 06:29 AM
    Hi Nikita,

    You can use try using below script for decoding :

    -----------------------------------------------------------------------------
    import org.apache.commons.codec.binary.Base64;

    String EnMssg = testExec.getStateValue("propertyname");

     byte[] decodedMessage = Base64.decodeBase64(EnMssg.getBytes());
    String msg = new String(decodedMessage);
    testExec.setStateValue("decodedMsg", msg);

    -----------------------------------------------------------------

    Thanks

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



  • 9.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 07:22 AM

    Thanks for the input.

    Actual issue is that application is sending the message in text format but VSE is converting that to encoded format.

    we have tested in ITR mode in our local machine and we can see the message in text format.

    but when we deploy the VSM on VSE server we see VSE is encoding the messages.

    is there any configration setting in VSE where we can disable the encoding.




  • 10.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 07:46 AM
    Edited by Vaibhav Jain Jul 07, 2020 07:50 AM
    Do you mean:

    --> your service is R-R based with encoding of UTF-8

    --> Your request is in UTF-8 and visible in UTF-8 in workstation but in VSE encoding type is base64 and message becomes diff?

    Also please mention, which version of DevTest are you using and share the req from both vse and workstation, if possible.

    Thanks.

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



  • 11.  RE: Re: how to disable encoding on VSE server.

    Posted Jul 07, 2020 08:12 AM
    Service is created using RR pair normal steps.

    If we test service in workstation ITR getting msg sent in same format, but when same service is deployed at VSE getting base64 encoded msg.

    DevTest Version: 10.4