rajeshbachani
15 years agoOccasional Contributor
Removing CDATA from a Soap Request
Hi folks!
I have done a lot of research on this issue; even some posts here on the forum were indicating to a similar situation - but could not find any precise help. I hope someone will be able to help me here.
So, when I do a property transfer from a project-level property which contains an XML node having not null child nodes: for example -
device property with value - <device><id1>1</id1><id2>1</id2><id3>1</id3></device>
And when I try to do a property transfer of this into a Soap request - the value fed into the request is pre-pended with a CDATA tag.
This leads to the request being ill-formed and automatic tests cannot work with this.
So, my idea was to use a groovy script snippet before submitting the request - which replaces the CDATA and other problem creating strings.
I have been able to retrieve the entire request into a String variable in groovy - and also replace the necessary strings.
But I am having no clue on how to store the same modified request back into the method request.
1. Is this possible at all? I am not using the Pro version - whih I understand can make this possible using the event listeners?
2. But anyway, just with the normal free version, if possible, how can this be achieved?
Thanks for any help!
Raj.
I have done a lot of research on this issue; even some posts here on the forum were indicating to a similar situation - but could not find any precise help. I hope someone will be able to help me here.
So, when I do a property transfer from a project-level property which contains an XML node having not null child nodes: for example -
device property with value - <device><id1>1</id1><id2>1</id2><id3>1</id3></device>
And when I try to do a property transfer of this into a Soap request - the value fed into the request is pre-pended with a CDATA tag.
This leads to the request being ill-formed and automatic tests cannot work with this.
So, my idea was to use a groovy script snippet before submitting the request - which replaces the CDATA and other problem creating strings.
I have been able to retrieve the entire request into a String variable in groovy - and also replace the necessary strings.
But I am having no clue on how to store the same modified request back into the method request.
1. Is this possible at all? I am not using the Pro version - whih I understand can make this possible using the event listeners?
2. But anyway, just with the normal free version, if possible, how can this be achieved?
Thanks for any help!
Raj.