I am trying to write a groovy script to update some of the CDATA section of a SoapUI request.
I am a total novice with respect to both SoapUI and groovy.
I have successfully managed to do what I need by using property transfers, however, since I need to do the same processing in almost all my testcases, I would rather do it in a script that can be called from wherever it's needed.
I have tried to mimick the property transfer steps in groovy, but have had no success as I can't seem to access and parse the CDATA section.
Any help on how to parse and update the values using groovy will be much appreciated.
An example of the request format is shown below
<soapenv:Envelope xmlns:soapenv="soappath" xmlns:myns="mynamespacepath">
<soapenv:Header/>
<soapenv:Body>
<myns:CMSXMLWebImport>
<myns:xmlIn><![CDATA[<CMSCardRequest xmlns="http://mypath2">
<Group>
<Name>Finance</Name>
<OrgUnit>OU=Finance,OU=Enterprise,DC=DummyDomain</OrgUnit>
<Parent>Enterprise</Parent>
<User>
<Personal>
<FirstName>xxx</FirstName>
<LastName>xxx</LastName>
<Email>[email protected]</Email>
</Personal>
</User>
</Group>
</CMSCardRequest>]]></myns:xmlIn>
</myns:CMSXMLWebImport>
</soapenv:Body>
</soapenv:Envelope>