HartfordFireInsurance

A Tip: Program your Virtual Service, by clicking on it's url, to display an example of it's request/response pairs.

Discussion created by HartfordFireInsurance on May 15, 2015
Latest reply on May 19, 2015 by Rick.Brown

Hi.  I just wanted to post a tip that we have started to use. This helps users communicate with our Virtual Services.  The tip is to generate another response in the virtual service image that responds to a user just clicking on our endpoint.  This response shows an example of what our virtual service expects and then what it will send back (sample request/response pair).  Here is an example.  A user just types in this endpoint into their browser:  http:/wh1tkod0068:15501.  To process this request, in the virtual service image, we need to handle the “GET /” transaction with no request but with the below response.  The output from this is:

 

Message from LISA NAVIGATOR VIRTUAL SERVICE: This is a Default Response generated by clicking on the URL. To get a normal response please send in a POST along with NAVIGATOR_INPUT set to either Message1 or Message2. See the following sample code (without the spaces).

 

 

REQUEST TO LISA < NAVIGATOR_INPUT >MESSAGE1< /NAVIGATOR_INPUT > RESPONSE FROM LISA < NAVIGATOR_OUTPUT >This is the output for message 1

 

 

 

This could be a best practice.  Just click on the url to see what the virtual service expects.

Outcomes