Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Is it possible to create parameterized messages using a traffic file without changing namespaces?

Options
amurphy147
amurphy147 Posts: 18

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

  • williammccusker
    williammccusker Posts: 643 ✭✭✭
    Options

    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?

  • amurphy147
    amurphy147 Posts: 18
    Options

    Below is a screenshot of the the "good" response from the live service (left) and the "bad" response from the pva (right).

  • williammccusker
    williammccusker Posts: 643 ✭✭✭
    Options

    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.

  • [Deleted User]
    Options

    There is an option called Hierarchical Parameterization for this.
    https://docs.parasoft.com/display/VIRT9107/Consuming+the+Data+in+Tools#ConsumingtheDatainTools-HierarchicalParameterizationwithLiteralView

    Basically, 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.