Forum Discussion

ha04's avatar
Occasional Contributor
7 years ago

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



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="" xmlns:xsi="" xmlns:xsd="" xmlns:ns1="urn:REQUESTTNS">


I followed the steps:

1. create the RequestTestStep whose response you want to save
2. create PropertyTransferTestStep
3. create DataSink TestStep, choose excel type, add a property with value empty and set the out file where to save the content
4. in PropertyTransferTestStep set source to request/response and target to DataSink/property you've added


Thank you!

  • 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:



    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.

20 Replies

  • groovyguy's avatar
    Champion Level 1

    I've moved your reply to a new thread, as replying to a thread that is over 7 years old may not get you the answer that you need. Usually you should post your own thread with your own specific details. 

  • nmrao's avatar
    Champion Level 3
    I do not really favour of putting xmls into excel. This is just my opinion.

    Reason being, excel becomes bigger, not readable. Instead, put the xml content into a file and put the file name excel if you want to continue to use that approach.

    Now coming to your question, is the issue in getting the incorrect response? or not writing the correct content to the file?
    • ha04's avatar
      Occasional Contributor

      Thank you very much for your response!


      I got the response OK.  This is the issue not writing the correct content to the file.  Please let me know how to fix this issue.


      • nmrao's avatar
        Champion Level 3
        Would you mind showing how you save it?