Contributions
Remove Empty Content
Hi, I almost found the perfect solution to a problem I am facing, but I don't know if you regard this as a bug or as a new feature. It seems like the feature "Remove Empty Conent" only processes the request once, but I was hoping it to do multiple passes. Removing all empty tags can result with an empty tag =). Example: Removing empty content in this pseudo-xml: <tag1> <prop1/> <prop2></prop2> </tag1> The result from this is an tag with empty content: <tag1/> Regards, Joakim.14 years agoPlace ReadyAPI QuestionsReadyAPI Questions8.9KViews0likes8CommentsRe: Temporarily remove optional elements
I'm gonna answer on my own post =) Well, it seems like the idea kind of works. Need to gather all input data into one worksheet in Excel though (I can only iterate one data source?). Which leads to a worksheet with ~100 columns! But the rest seems to be feasible with a couple of scripts steps and a property transfer: TemplateCall (SOAP step, disabled) ExcelSource (Data source step) ExecuteIteration (Script step) RemoveUnwantedNodesFromRequest (Script step, disabled) Call (SOAP step, disabled) RecreateRequest (Property Transfer step, disabled) LoopSource (Data loop step, Source = ExcelSource, TargetStep = ExecuteIteration) Something like that, if it's possible to execute disabled steps from script code. Is this the way to go? Regards, Joakim.1.1KViews0likes0CommentsTemporarily remove optional elements
Hi, I'm trying to setup a test case where I can temporarily remove optional elements from the request. I've setup a test case that reads input data from an excel data source and executes a call to a web service for each row in the excel source: Now we are creating more complex tests, setting the optional elements in an arbitrary way. I need help with seting up my test case to support this. I have a worksheet in the excel for each optional element. For each row in the worksheet there is a field representing whether or not to use the optional input or not. What I want to do in soapui is: read the excel source -> loop through the data source -> databind property to the request -> remove the optional elements from the current request according to the field mentioned above -> call the web service. Any ideas how to solve this? The only idea I have is to have to two SOAP call test steps: One that is the complete call inlcuding all optional elements and this one will work as a template. Then a second call step that will be used for the actuall call, but will be modified prior to the call. After the call I want to restore the second call to match the template (copy and replace?). I know that I can modify the request using a script, but I don't know how to restore it afterwards. Is this a proper solution? Regards, Joakim.2.7KViews0likes2Comments