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.

Can parasoft understand a java program which reads xml in java an convert it to string?

I have an XML file that contains only 2 parameters that can be parameterized - Country Code and Request. However I want to read the body in tag and convert it into text so that it can be used for correlation.
Kinldy help.

Comments

  • keegan_chan
    keegan_chan Posts: 59 ✭✭

    From what you said, I assume you want the content of the "Request" tab to be parsed and the individual values to be used for Data Source Correlation. One of the ways you can do it is to go to the Options tab, select Request Handling, check the "Allow incoming request tools to modify the message before applying data source or multiple response correlations" checkbox. Then you can add an Extension Tool to the Incoming Request Payload of the responder to run a java program that parses the XML into another XML where those individual values are each within their own XML tag. Thus, you should be able to do Data Source Correlation on the individual XML element.

  • Charu_Taneja
    Charu_Taneja Posts: 8

    Thank you for the suggestion.

    However, I have a query here. Is it mandatory to pass an XML only through the Extension Tool for Incoming Request Payload.

  • keegan_chan
    keegan_chan Posts: 59 ✭✭

    Please refer to the documentation on Extension Tool to see how it works in general. But specifically for this scenario, I think the payload passing through the Extension Tool for Incoming Request Payload is already XML.