after I modify XML request in a test case and save it, close SoapUI, open SoapUI again the changes that I made stay there. This is OK. I deleted 2 elements and did not find them in xml request after I close-open soapUI. But I found out that 1 more element is deleted, the one that I did not touch. It is reproducable (I did it a few times), the element was always the same (). Any suggestions?
Apart of this how would you right a groovy script that first checks the existance of an element in XML request and if it's NULL adds it as a child to the parent under which you checked the existance. Say the element name is . It is a child of . The xml request is below:
// create text content elm.appendChild( node.ownerDocument.createTextNode( "testing text" )) }
The tricky part above is to insert the node into the right position (In my example I just appended it..), you would first have to find the node to insert before and then use node.insertBefore( .. ) instead of node.appendChild..
What you could do is generate XMLBeans for your wsdl (using the integrated XMLBeans wizard), add the generated jar to soapui\bin\ext, and then use these to manipulate the request.. they would make this much easier. Let me know if that is of interest and I'll prepare an example for you next week..