Service Virtualization

Expand all | Collapse all

how to extract custom JMS header property in the VS

  • 1.  how to extract custom JMS header property in the VS

    Posted 10-24-2018 08:33 AM

    Hi All,

     

    i want to extract a custom JMS header property called 'Compressed' from incoming  request  in Scriptable Data protocol filter in Listen step.

    im using Messager consumer (deprecated) step with make payload last response unchecked , also added extract payload and   properties from messages filter with prefix 'prop'.

     

    i added a Scriptable data protocol filter with the below code:

    String status=lisa_vse_request.getMetaData().getParameterValue("Compressed");

    testExec.setStateValue("status",status);

     

    i ran the ITR, but the the value for 'status' is <removed> in the test events.

     

    Could you please let me know the solution for this.

     

    Thanks



  • 2.  Re: how to extract custom JMS header property in the VS

    Posted 10-25-2018 02:11 AM

    Hi,

     

    What version DevTest are you using?
    Can you attach the vsm/vsi files that you are using?

     

    Thank you,



  • 3.  Re: how to extract custom JMS header property in the VS

    Posted 10-25-2018 04:43 AM

    Hi ,

     

    DevTest version is 9.5

     

    Application will send the  request to the VS. Please find the below RFH Util screenshot of usr tab

     

    how can we get the property 'Compressed' into the Scriptable data protocol filter in the listen step of VSM?

     

    i tried following piece of code:

     

    ParameterList reqmetadata = lisa_vse_request.getMetaData();
    String value = reqmetadata.getParameterValue("Compressed");

    testExec.setStateValue("value",value);

     

    but it didnt work. in the ITR test events value is showing as <removed>.

     

     

    DannySaro Rick.Brown  : could you please suggest here if you have any solution for this!

     

    Thank you.



  • 4.  Re: how to extract custom JMS header property in the VS

    Posted 10-26-2018 01:38 AM

    Hi,

     

    How do you decide that the "Compressed" is in the Metadata side of the request?
    Could you please check the value of lisa.vse.request which is truncated in your screenshot below?


    Thank you,



  • 5.  Re: how to extract custom JMS header property in the VS

    Posted 10-26-2018 01:58 AM

    Yes, please, in order to help out, as Yusuke is asking provide some view of the lisa.vse.request structure.

     

    Or, I can see that you are debugging this in ITR, so instead of ITR start a recorder, add a Request Data Manager as the last of your data protocol handlers. During the recording when the wizard shows the Request Data Manager configuration screen you will see a treeview of the lisa.vse.request structure. Browse the tree until you find the Compressed property, select it. Then add an action to “Move”  that value to an argument.

     

    Cheers,

    Danny



  • 6.  Re: how to extract custom JMS header property in the VS

    Posted 10-26-2018 06:08 AM
      |   view attached

    Hi Yusuke,

    my understanding is that all header properties will be present in meta data. i may be wrong here.

     

    PFA the lisa.vse.request. my observation is that this "compressed" header is not present in  lisa.vse.request property.

     

    thanks

    Attachment(s)



  • 7.  Re: how to extract custom JMS header property in the VS

    Posted 10-26-2018 09:04 AM

    Is your JMS in the backend connecting an MQ? It seems that way from your original printscreen.

     

    Have a look at following answered question, it might be relevant “How can I access the usr User Properties in MQRFH2 Folder from MQ VS” (https://communities.ca.com/thread/241771137-how-can-i-access-the-usr-user-properties-in-mqrfh2-folder-from-mq-vs)

     

    If at the backend you have an MQ server then most likely that server is not adding the usr properties to the header because it has not received the ‘Force MQRFH2’ option.

     

    Cheers,

    Danny



  • 8.  Re: how to extract custom JMS header property in the VS

    Posted 10-29-2018 01:40 AM

    Thanks Danny and Yusuke. i will look into it .