Contributions
Re: Unexpected Content
To Followup. I wanted to figure out how SoapUI knew what it knows about each test, so I added a new "Disconnect" step like the ones I was having issues with. Here is what I found on the new one I Added: APSOrderInterfaceSoap DisconnectService Here is what I found on the Offending one: APSOrderInterfaceSoap ReserveAssetsForService Notice that the Offending request "con:operation" is "ReserveAssetsForService" and the new one "con:operation" is DisconnectService .... which is what it should be. Something went Wonky on me here and I don't know what to do. Now that I look at it, there are over 100 of these and they are all giving me this error. what can be done? Thanks, John701Views0likes0CommentsSoupUI Pro Locking up my Mac System
I am using SoapUI pro. I have noticed that when I am working on a Groovy Script my system seems to lock up for 20 - 40 Minutes. I further notice that it is mainly when I move my mouse pointer into the Log Output section of the GUI. If I close the Log Output window the issue is minimal. However, I need the Log output to troubleshoot and verify the script. Is this something that is known? Is there something I can do about this - it is very detrimental to my work productivity to wait 40+ minutes for my system to return to a working system. I really like SoapUI and my boss enjoys the testing that we are able to do with it. I need to be able to continue to develop. Help, John ps. As as example I submit my latest issue. /* * Cleanup Script * XXXXXXXX , Inc * ver 20080902.001 */ import java.text.DateFormat; import java.text.SimpleDateFormat; def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ); def _xmlUtil = new com.eviware.soapui.support.xml.XmlUtils(); def testCase = testRunner.testCase; def opening = [" ", " ", "", " ", " "]; def closing = [" "," ",""," "]; def list = [] def cleanUp01 = groovyUtils.getXmlHolder ( "Cleanup_01#Response" ); def reqPaths = cleanUp01.getDomNodes ( "//ns1:APS_LINE_RECORD/descendant::*" ); def cleanUp02 = groovyUtils.getXmlHolder ( "Cleanup_02#Request" ); def resPaths = cleanUp02.getDomNodes ( "/" ); for (k in resPaths) { cleanUp02.removeDomNodes ( _xmlUtil.createXPath ( k )) } cleanUp02.updateProperty() for (j in opening) { insertIntoList ( j, list); } for (i in reqPaths) { createNewNode( i, list ) } for (l in closing) { insertIntoList ( l, list ) } log.info list def result = list /* * Some functions */ def createNewNode (node, list) { def _xmlUtil = new com.eviware.soapui.support.xml.XmlUtils(); java.io.StringWriter writer = new java.io.StringWriter() com.eviware.soapui.support.xml.XmlUtils.serialize ( node, writer ) list.add ( writer.toString() ) } def insertIntoList (node, list) { list.add ( node ) }5.2KViews0likes11CommentsRe: xpath and getNodeValues
Well, that made it slap easy. def _xmlUtil = new com.eviware.soapui.support.xml.XmlUtils(); ... newNode = holder.getDomNodes ( "//aps:Value" ); for ( i in newNode ) { _xmlUtil.setNodeValue(i, "newValue"); } holder.updateProperty() It was the XmlUtils that I didn't know about. Thanks for your help!! John1.5KViews0likes0CommentsRe: Inserting XML
I tried this. However, what was happening was I was getting one parent tag too many (Only wanted the children) and I was blowing away the Parent node where I was trying to put it. I wanted the children to go into the parent of the resulting doc without the parent of the requesting doc. If that makes sense. for example: What I had What I wanted in the END:715Views0likes0Commentsxpath and getNodeValues
Greeting, How would I use getNodeValues if I was to get multiple nodes. for example: this is a test Yet another test If I use: def holder = groovyUtils.getXmlHolder( "Book Author Search#Response" ) bartest = holder.getNodeVales ( "//bar" ); I can only update the FIRST bar! I have multiple "bar" that I need to update. How can I get to the others? I read in the docs "If the specified XPath expression returns multiple values when getting a value, a String array is returned instead:" So, I get a string. I need the reference to the holder for each bar or, am I thinking wrong? JOhn3.8KViews0likes4CommentsInserting XML
I apologize ahead of time for being new to XML and SoapUI and for not using the correct terminology. However, I am trying to do the following from an Groovy Script. 1 - Read a Response and Grap all the information between a tag. (for example everything between ... 2 - REMOVE everthing between a tag (ie ... in a different Request and then STUFF everhting I got in step 1) and put it into the now empty of Step 2. I just don't know where to start with that. I have looked thru Groovy and SoapUI and tried a few things using XmlParser and XmlHolder, but not getting it done. Thanks for any help. --Jb2.1KViews0likes2CommentsXmlHoder Null Pointer Exception
Greetings I am running a GroovyScript that has the following code: ... def holder = groovyUtils.getXmlHolder( it.name+"#Response" ); if (holder["//ns1:FunctionReturnCode"] == "SUCCESS") { ... The issue is the #Response may or may not be there. Therefore I am getting a NullPointerException. This, for one, locks up my system for about 20 minutes while it does something ... However, I want to know how I can check for a valid response without getting a nullPointer? Is there a check I can run. I looked at the API for xmlHoder but I cannot find anything. Thanks, Jb1.6KViews0likes1Comment