Remove Empty Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2011
03:20 AM
02-28-2011
03:20 AM
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.
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.
8 REPLIES 8
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2011
09:54 AM
03-01-2011
09:54 AM
Where do you see the feature "Remove Empty Content"?
What is the behavior you are expecting?
What is the behavior you are expecting?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2011
04:26 AM
07-01-2011
04:26 AM
This is a property of the Soap request (see properties grid for a soap request on the left bottom).
I have exactly the same problem. I need an array that does not have any real content in it, to be an actual empty array, not an array with empty elements if all attributes of the elements are empty.
Because this might hurt performance, it could be an extra setting "Remove Empty Content recursively", so that empty content is removed until no empty tags exist in the raw request only when this setting is true.
I have exactly the same problem. I need an array that does not have any real content in it, to be an actual empty array, not an array with empty elements if all attributes of the elements are empty.
Because this might hurt performance, it could be an extra setting "Remove Empty Content recursively", so that empty content is removed until no empty tags exist in the raw request only when this setting is true.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2013
04:04 AM
07-04-2013
04:04 AM
Joakim - Your old request from 28 feb 11 (See below) ... did you ever found a proper solution ... struggeling with EXACT same issue .... All Inner tags are cleared (Simply NO text) sas wanted - but the outer tag is left and with in the tag is a number of CR/LF charecters left - subsequently the service I call throws an error because IF the tag start/tag end is send the Schema checks for the content with in the Grup tag start/tag end .... frustrating ... 😉
Regrards Lars
Remove Empty Content
by joakimrosendahl » 28 Feb 2011 13:20
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.
Regrards Lars
Remove Empty Content
by joakimrosendahl » 28 Feb 2011 13:20
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2013
04:19 AM
07-08-2013
04:19 AM
Hi,
This is in our backlog [SOAPUI-4059].
Regards
Henrik O
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
This is in our backlog [SOAPUI-4059].
Regards
Henrik O
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2013
08:21 AM
11-14-2013
08:21 AM
Hello!
I've just started testing with SoapUI and I have exactly the same problem to remove the empty content... I see it is in the "backlog SOAPUI-4059".
I use SoapUI Pro 4.6.0. and what I've read about 4.6.1 and 4.6.2, it is not implemented, isn't it? Please, has somebody found another way to solve it (Groovy, etc)? Or is there "combination of tools" in 4.6.1 or 4.6.2, that would help?
Regards
Isana
I've just started testing with SoapUI and I have exactly the same problem to remove the empty content... I see it is in the "backlog SOAPUI-4059".
I use SoapUI Pro 4.6.0. and what I've read about 4.6.1 and 4.6.2, it is not implemented, isn't it? Please, has somebody found another way to solve it (Groovy, etc)? Or is there "combination of tools" in 4.6.1 or 4.6.2, that would help?
Regards
Isana
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2013
11:20 AM
11-15-2013
11:20 AM
Hi,
Same question was asked on a different post.
Please see this post as a workaround:
viewtopic.php?f=4&t=21869
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Same question was asked on a different post.
Please see this post as a workaround:
viewtopic.php?f=4&t=21869
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2013
08:01 AM
11-16-2013
08:01 AM
Hello Markus
Thank you for your feedback. But it doesnt work. What am I doing wrong?
I created an event RequestFilter.filterRequest and in "Target" I put the script you have mentioned:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def stepName = context.getCurrentStep().getLabel()
def holder = groovyUtils.getXmlHolder( stepName + "#Request" )
for( item in holder.getDomNodes( "//*[. = '']" )){
holder.removeDomNodes("//"+item.nodeName)
}
// update request
holder.updateProperty()
// write updated request back to teststep
context.requestContent = holder.xml
Now the data from my xls are not read anymore from the Datasource. The request ist sent with the syntax the parameters as a string value. For example:
<callContext>
<caller>${DataSource_P#caller}</caller>
<user>${DataSource_P#user}</user>
<uuid>${DataSource_P#uuid}</uuid>
</callContext>
instead of:
<callContext>
<caller>T1</caller>
<user>hausi</user>
<uuid>uuidT1_1</uuid>
</callContext>
regards,
Isana
Thank you for your feedback. But it doesnt work. What am I doing wrong?
I created an event RequestFilter.filterRequest and in "Target" I put the script you have mentioned:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def stepName = context.getCurrentStep().getLabel()
def holder = groovyUtils.getXmlHolder( stepName + "#Request" )
for( item in holder.getDomNodes( "//*[. = '']" )){
holder.removeDomNodes("//"+item.nodeName)
}
// update request
holder.updateProperty()
// write updated request back to teststep
context.requestContent = holder.xml
Now the data from my xls are not read anymore from the Datasource. The request ist sent with the syntax the parameters as a string value. For example:
<callContext>
<caller>${DataSource_P#caller}</caller>
<user>${DataSource_P#user}</user>
<uuid>${DataSource_P#uuid}</uuid>
</callContext>
instead of:
<callContext>
<caller>T1</caller>
<user>hausi</user>
<uuid>uuidT1_1</uuid>
</callContext>
regards,
Isana
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013
12:58 PM
11-19-2013
12:58 PM
Hi Isana,
Instead of putting the script in "Target" try to put it in the text box below. As described here:
http://www.soapui.org/Scripting-Propert ... dlers.html
Thanks,
Michael Giller
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Instead of putting the script in "Target" try to put it in the text box below. As described here:
http://www.soapui.org/Scripting-Propert ... dlers.html
Thanks,
Michael Giller
SmartBear Software
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
