sampleProject.zip

File uploaded by amfamJeff on Jun 27, 2014
Version 1Show Document
  • View in full screen mode

This is a sample project that shows how to create a virtual service that can be manipulated from an external properties file to change the flow of the VSM.  The three different modes are as follows:

 

  1. Pass thru - this mode passes a request thru to a live service and only access the VSI in the event that certain errors are detected in the response from the live service.
  2. Capture - this mode passes the request to the live service and store the xml request/response of the call in an external properties folder called XMLPairs (found in the External Properties folder of the attached zip).
  3. Virtual - this mode is your basic VSM path.  It simply takes xml request and sends them straight to the VSI and choosing the most appropriate response.

 

The VSM is driven by two values found in a file called properties.txt. An example of this file is found in the External Properties folder of the attached zip. This file needs to be external to your VSE and your VSE needs to have access to the path where the file is located.  That is because in the second step of the VSM, that file is accessed to get the values for the parameters of Mode and endpoint.  From there the VSM will follow assertions to determine the path through the VSE.  The proper Mode values are passthru, capture, virtual.  The endpoint value tells the Live Service call (when using passthru or capture) what the endpoint of your live service is.  This gives you the ability to change the endpoint to any other service endpoint without needing to redeploy the VSM, simply change the endpoint in the properties.txt file.  The endpoint value is parameterized in the 'endpoint' field of the Live Service step as {{endpoint}}.

 

I hope this helps.


Attachments

Outcomes