Service Virtualization

Expand all | Collapse all

HTTP> MQ Proxy

  • 1.  HTTP> MQ Proxy

    Posted 02-27-2017 09:49 AM
      |   view attached

    I've a requirement to take a HTTP request send to MQ then send back the response as HTTP illustrated below,




    Debugging the VSM everything seems to work however my response just hangs I think this is because on the HTTP Responder step this returns the lisa.vse.response property. 


    Any ideas?


    I have attached example project, the proxy is named MQ_Proxy


    zip   36K 1 version

  • 2.  Re: HTTP> MQ Proxy

    Posted 02-27-2017 10:13 AM

    Just curious....

    Would it be possible to

    a) add an HTTP VSI Selection Step prior to the MQ Call Step. [Use the HTTP VSI Selection since this is an HTTP Responder not a JMS Responder.]

    b) Change the Stateless Image Response META HTTP Response code to 200 rather than default 404.  The VSI Selection simply returns a Service Image Not Found Response but generates a proper lisa_vse_response list.  

    b) after the MQ Call filter the MQ response into a property 

    c) add script to set the property into lisa_vse_response.get(0).setBody( {{yourMQResponse}} );   OR, if lisaMQCall.rsp is used and content is string, replace {{yourMQResponse}} with testExec.getStateValue("lisaMQCall.rsp")  


    On occasion, I will use a VSI Selection Step to ensure that the lisa_vse_response object gets created properly.  Then, override the body as needed.


    - Minor edits to sequence with added clarifications based on additional offline conversation and final actions taken.

  • 3.  Re: HTTP> MQ Proxy

    Posted 02-27-2017 11:13 AM

    You have a finite amount of time to respond to the initial HTTP request. Is it not possible to do this as an asynchronous response. HTTP Respond 200 - call MQ - then make a separate HTTP/HTML Request back to the sender. Then if there is a delay with the MQ at least you have completed the handshake.