Hi Nick,
strange.. I can't reproduce this... can you mail me your project-file so I can try with it locally?
Regarding the check, you could do something like the following:
// check for node
node = holder.getDomNode( "//lis:PGID" )
// not there?
if( node == null )
{
// get parent
node = holder.getDomNode( "//lis:request" )
// create new element
def elm = node.ownerDocument.createElementNS( "
http://services.tvguide.com/v2.5/listings", "PGID" )
// add it to parent
node.appendChild( elm )
// 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..
best regards!
/Ole
eviware.com