Create Virtual Services from SOAP request and response pairs
search cancel

Create Virtual Services from SOAP request and response pairs

book

Article ID: 94990

calendar_today

Updated On:

Products

Service Virtualization

Issue/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 of the DevTest release you are running in section "Naming Conventions" of "Request/Response Pairs".

For Sidecar files, please refer to our documentation of the DevTest release you are running in section "Sidecar Files" of "Request/Response Pairs".

And also the KB: How to add custom headers to Request/Response when creating VS using RR pair - Adding custom headers to Request/Response when creating VS using RR pairs.

For REST request and response pairs, the files should follow the format specified in our documentation of the DevTest release you are running in section "Request/Response Pair Format" of "REST Data Protocol Handler".


 

Environment

All supported DevTest releases.

Cause

The first line should contain an XML Declaration.

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

Resolution

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.