Forum Discussion

ha04's avatar
ha04
Occasional Contributor
7 years ago
Solved

Re: How to store response values into excel using SOAP UI pro?

Hi!   Could you let me know why I only get the following line in the output file, but not getting the response values please?   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope...
  • groovyguy's avatar
    groovyguy
    7 years ago

    There are three screenshots that are generic but should get you on the right path.

     


    Test case is just that, a test case that has a request, an xml data source, another request to use the datasource information, and the loop to go through all the snumbers.

     

    The XMLDataSource may be the trickiest part to set up. It took me awhile to get it. You have to do the following:

    • Create a property 
    • Set DataSource type to XML
    • Set source Step for the request that provides the response with a list of snumbers
    • Set source property as Response
    • Row Xpath: This is the tricky part
      • Use the XPATH button to find the PARENT element to sNumber
      • Click OK
      • remove any part of the statement that has a [(number)] on them.
        • Example: //responseItem[1] should be //responseItem
        • Do this for all bracketed numbers
    • Column Xpath
      • This should be the tag of the element and the name
      • Example, assuming namespace of ns1: 
        • ns1:sNumber

     

    If you run the request that has a response with the sNumbers, you can hit the green play button on the datasource to test and see if it works.

     

    Once that is set up, you can set the looped request to reference the sNumber property with property expansion:

    ${XMLDataSource#sNumber}

     

    And set the loop to use the XML DataSource as its source, and the looped request name as the test step to start at. This will hopefully parse the response of sNumbers and loop through them.