Create Virtual Services from SOAP request and response pairs

Document ID : KB000094990
Last Modified Date : 16/10/2018
Show Technical Document Details
Introduction:
When creating a Virtual Service from request and response pairs (RR pairs) the files should follow some specifications:

For Naming Conventions, please refer to our documentation in the following link: https://docops.ca.com/devtest-solutions/10-3/en/using/using-ca-service-virtualization/ca-service-virtualization-concepts/request-response-pairs/#Request/ResponsePairs-NamingConventions

For Sidecar files, please refer to our documentation in the following link: https://docops.ca.com/devtest-solutions/10-3/en/using/using-ca-service-virtualization/ca-service-virtualization-concepts/request-response-pairs/#Request/ResponsePairs-SidecarFiles
and also the knowledge article KB000042219 - How to add custom headers to Request/Response when creating VS using RR pair - https://comm.support.ca.com/kb/How-to-add-custom-headers-to-RequestResponse-when-creating-VS-using-RR-pairs/KB000042219

For REST request and response pairs, the files should follow the format specified in the following link: https://docops.ca.com/devtest-solutions/10-3/en/using/using-ca-service-virtualization/using-devtest-portal-with-ca-service-virtualization/rest-data-protocol-handler#RESTDataProtocolHandler-Request/ResponsePairFormat

 
Environment:
DevTest 10.3.
Instructions:
For SOAP request and response pairs, the SOAP envelope payload is required.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<soap:Header>
...
</soap:Header>
<soap:Body>
...
  <soap:Fault>
  ...
  </soap:Fault>
</soap:Body>
</soap:Envelope>
 

If there is a need to add a base path to the VSM, you can do it by adding a POST URL as the first line in the request file:
Example:
POST /aaa/bbb/ccc HTTP/1.1

SOAP Payload here.
 
Note: there must be an empty line to separate the body from the header.
While selecting the Data Protocol Handlers (DPH), remove the REST DPH added and leave the SOAP DPH.
 
A basepath can also be added or modified in the VSM, Listener step after the Virtual Service is created.
There are few SOAP payloads examples available in the DevTest Portal, under Create, Virtual Service, RR Pairs.