How to validate response elements with SQL query result?

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
i have added database as datasource and executed the query, then forwarded the result to table. so table has a set of records.

now i send xml request to webservice and gets response. now i want to validate the values of response elements against values present in table(sql result).

please let me know how this can be done?




  • LegacyForumLegacyForum Posts: 1,669 ✭✭

    First use the "Create Regression Control" feature to auto generate a Diff Tool. Then switch the Diff Tool from "Literal XML" to "Form XML". From the "Form XML" view, you should be able to parameterize the desired elements from any data source(including a Database Data Source).

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    hi Joe,

    we can do that way straight forward if all the elements of response are simple i mean to say leaf nodes. but when elements are complex in nature, it doesnot work. see that complex element may appear n-number of times in response. i want to validate the leaf elements of n-time appearing complex element.
    for validation i will execute SQL query and get set of records.
    now i how can i parameterize each element of complex element and validate across the sql query result?

  • LegacyForumLegacyForum Posts: 1,669 ✭✭

    To do this, you can use an XML Data Bank to extract the desired fields of the the n-elements of the XML response to a Writable Data Source.
    Then you can have a DB Tool that will get the values from SQL and use an XML Data Bank to extract to the same Writable Data Source.

    Once both sets of data are in the Data Source, you can use a Method tool to compare each set of matching columns.

Sign In or Register to comment.