Contributions
How to extract paramtered request xml in soap ui
Hi Team, We are trying to copy xml from one request to another. where as we need to copy the paarmeterized text. Using below code we are trying to copy the request from AddOriginal to AddActual import groovy.xml.* import groovy.util.XmlParser import com.eviware.soapui.support.GroovyUtils def request =context.expand('${AddOriginal#Request}') def grUtils = new com.eviware.soapui.support.GroovyUtils(context) def TargetTestcase=testRunner.testCase TargetTestcase.getTestStepByName("AddActual").setPropertyValue('request',request) def ReqHolderActual = grUtils.getXmlHolder("AddActual#Request") ReqHolderActual.removeDomNodes('//tem:intA') ReqHolderActual.updateProperty() Code was able to get only hard code values, but actually we need Parameterized values, is it possible? ${intB} is not coming :( Verified the same with hard coded values and its working.918Views0likes0CommentsHow to copy Request from one soap step to another soap step using Groovy
Hi Team, We are trying to control sending request from Excel Data. If excel has "null" for an parameter, we have to remove that element in the request. We have written a groovy to remove that by using below code. def grUtils = new com.eviware.soapui.support.GroovyUtils(context) def ReqHolderOriginal = grUtils.getXmlHolder("AddOriginal#Request") ReqHolderOriginal.removeDomNodes('//tem:intA') It removes perfect, but the problem is, we need that element for next test case. Where as i am trying to have two soap requests. 1. Original 2. Actual Copy Original to Actual and remove the element there and make a call. Any help would be really appreciable. Thanks Udaya993Views0likes2Comments