Hi,
The data protocol handlers in your Listen step will transform the body of your incoming request step by step into an XML representation of the data in your request.
In your case the Swift DPH will transfrom the original swift message into an XML representation (with the main objective to create arguments from the resulting XML tags)
If you want to grab the original request body then you need to do this immediately after the Transport Protocol Handler has turned the incoming request into a request object.
So, add a Request Data Copier DPH as the very first DPH and copy the request body to a property.
------------------------------
Cheers,
Danny
------------------------------
Original Message:
Sent: 10-11-2019 04:53 AM
From: Sumta
Subject: Extract the Raw swift message in the IBM Native Listen step
In Addition to this, if the VS is created using IBM Websphere MQ step (deprecated), by using "extract payload and properties messages" Filter in Listen step, able to filter the swift message properly.
Attached the Screenshots for the same.
Question is : using IBM Native step, how can the swift message request be stored into the property in IBM Native Listen step.
Original Message:
Sent: 10-11-2019 02:56 AM
From: Sumta
Subject: Extract the Raw swift message in the IBM Native Listen step
Hi Natarajan,
getBodyBytes() returns a byte message as attached.
The request injected to the VS is of swift message format something like below:
{1:F01ANZBNZ20BXXX2122377814}{2:O1031703190913WPACNZ20DXXX00230904661909131704N}
Requirement is to extract this swift message from IBM MQ Native step and store it to a property for further manipulation of the request.
Thanks
Original Message:
Sent: 10-11-2019 02:21 AM
From: Sankar Natarajan
Subject: Extract the Raw swift message in the IBM Native Listen step
HI Sumalatha
You could use the following method that returns a byte[]
getBodyBytes()
-Sankar
------------------------------
Sankar Natarajan
Service Virtualization Product Engineering Team
Broadcom
Original Message:
Sent: 10-11-2019 02:03 AM
From: Sumta
Subject: Extract the Raw swift message in the IBM Native Listen step
Hi Team,
we are using DevTest v10.3.0.
Is there a way to extract the raw swift message in IBM Native Listen step in the VSM.
i tried extracting the Request using the below lines:
import com.itko.util.ParameterList;
String Request = lisa_vse_request.getBodyText();
testExec.setStateValue("Request",Request);
But the Request has come in xml format though the request injected is swift message.( attached the ITR screen shots).
Please suggest here.
Thanks in Advance.