Service Virtualization

Expand all | Collapse all

How to manage VSE requests

Jump to Best Answer
  • 1.  How to manage VSE requests

    Posted 06-10-2016 11:12 AM

    I am using DevTest 8.0.1 to create my first Virtual service model. I was able to create a sample virtual service using request response xml pair and deploy it on the VSE. I am able to successfully hit this virtual service and get the expected response. However when I replace the real backend URL in our application with the virtual service one, it fails because the request being received by the VS contains the prefix 'xmlreqdoc=' to the xml as show below

     

    The request VS is recieving -

     

    xmlreqdoc=<?xml version="1.0" encoding="UTF-8"?>

    <service>

    .......

    .......

    </service>

     

    The request VS is expecting -

     

    <?xml version="1.0" encoding="UTF-8"?>

    <service>

    .......

    .......

    </service>

     

    I tried using the 'Generic XML Payload parser' and 'Request Data Manager' as data protocols for request but couldn't get the required result.

     

    Any suggestion on how this can be achieved?

     

    Thank you.



  • 2.  Re: How to manage VSE requests
    Best Answer

    Broadcom Employee
    Posted 06-10-2016 02:30 PM

    I would use a scriptable DPH, which loads lisa_vse_request.getBody() and does a body = body.replace("xmlreqdoc=","")

    DevTest 8.0 - Scripting Guide - V1.1.pdf for hints as to how to do this.