Is it possible to create parameterized messages using a traffic file without changing namespaces?
Hi,
I just wanted to know if it's possible to create responders with parameterized messages without changing the original namespaces as seen in my recorded traffic. I've noticed that if I create responders with fixed messages, then the original namespaces are not changed by Virtualize.
My application breaks when it receives the pva's parameterized message response, because it can't parse through the message correctly due to the changes in the namespaces. But at the same time, I still want to be able to parameterize my responder's messages.
Any advice about how I could accomplish the above is appreciated.
Thank you in advance.
Comments
-
Hi,
Could you provide an example of how the namespace's are being changed? Maybe a payload of a "good" response and then a response with the "bad" changed namespaces?0 -
Below is a screenshot of the the "good" response from the live service (left) and the "bad" response from the pva (right).
0 -
Hi,
From the xml specification point of view the namespaces for each element is correct. The actual namespace of each element is the same as it was before. The difference is that the original payload had defined prefixes of "a" and "b" where as some of the elements are locally defining their own prefix.Does the application depend on the prefixes "a" and "b" for it to accept the payload? If that is the case you can switch the mode of the responder from "from" to "literal" and fix the namespace prefix declarations.
0 -
There is an option called Hierarchical Parameterization for this.
https://docs.parasoft.com/display/VIRT9107/Consuming+the+Data+in+Tools#ConsumingtheDatainTools-HierarchicalParameterizationwithLiteralViewBasically, create your asset using the parameterized traffic wizard then switch the responder to literal. You will see a parameterized body in literal. You can change the namespaces to what you need and it will all work.
0