Forum Discussion

arghvark's avatar
arghvark
New Contributor
10 years ago

Handling empty values returned from soap service

I have SoapUI pro reading values from an Excel spreadsheet, sending them to a Soap web service, and writing returned values to an output Excel spreadsheet.  It's working ok, but any values that are blank on return from the web service are written to the spreadsheet as a namespace XML tag.  If the service returns a string, then the string is written to the cell as I would suspect.  Is there a way to just have blank returned values written as blank to the spreadsheet?

    • arghvark's avatar
      arghvark
      New Contributor

      Actually, a kind user on StackOverflow already answered this for me -- sort of -- I just hadn't put it here.  

       

      You can avoid having XPath put its node in the place of empty text by appending "/text()" to the end of the XPath expression that SoapUI provides.  It goes just before the closing brace ("}").

       

      It would be better if SoapUI provided this when you chose the node, but there are so many things that would be better than what SoapUI does in regards to generating the XPath values it's hard to know where to start.  Anyway, that's a way you can do it if you need to.