Nagasree,
Normally you could add the "Delimited Text Data Protocol" DPH (see DelimitedTextDataProtocol.JPG) and it would parse out the request, however 2 of your arguments beneficiary.given:exact and beneficiary.family:exact cause a SAX parser error due to having a ":" in the argument name. "org.xml.sax.SAXParseException; See https://stackoverflow.com/questions/59151503/org-xml-sax-saxparseexception-the-prefix-for-element-is-not-bound
So I suggest adding a Scriptable Data Protocol DPH with the below Code to parse the body content to arguments. When you build from RR pairs I recommend adding a Request Data Manager DPH so you can see what you will get. When Trying this out I had the REST DPH then Request Data Manager DPH, then Scriptable Data Protocol DPH, then Request Data Manager DPH. That way I could see the result of the Scriptable Data Protocol DPH and go make changes if needed. (see VS-Develop-DPH.JPG)
code for Scriptable Data Protocol DPH:
%beanshell%
// You can use %beanshell%, %groovy% or %javascript% or some other installed JSR-223 scripting language
// This example is for beanshell
import com.itko.util.ParameterList;
import com.itko.util.Parameter;
import java.lang.Object;
import java.net.URLDecoder;
ParameterList args = lisa_vse_request.getArguments();
ParameterList metadata = lisa_vse_request.getMetaData();
// Looking up parameters
if (metadata.containsKey("Content-Type")) {
//int metSize = metadata.size();
String theContentType = metadata.getParameterValue("Content-Type");
if (theContentType.contains("application/x-www-form-urlencoded")) {
// Manipulate request body text
String theBody = lisa_vse_request.getBodyText();
String[] pairs = theBody.split("&");
for (String pair : pairs) {
int idx = pair.indexOf("=");
args.addParameter(new Parameter(URLDecoder.decode(pair.substring(0, idx), "UTF-8"), URLDecoder.decode(pair.substring(idx + 1), "UTF-8")));
}
lisa_vse_request.setArguments(args);
// end if (theContentType=="application/x-www-form-urlencoded")
}
}