ContributionsMost RecentMost LikesSolutionsRe: extract value from soap responseHi, The below code may help You // Read All response XML Using Xml Holder context.utils = new com.eviware.soapui.support.GroovyUtils(context) def response = context.expand( '${Your Operation Name here#Response}' ) context.holder = context.utils.getXmlHolder(response) // context.holder.getNodeValues("//Put the tagname as below") context.Dueval = context.holder.getNodeValues("//dsml:value") def sVal = context.Dueval.toString() log.info sVal // you will get your result. Re: How to write a reusable script LibraryHi Martin, You are real Dude man.. Thanks a lot for your time.. this is just great... it got work for me... Thanks again... Regards, Sandeep S SRe: How to write a reusable script LibraryHi Martin, Sorry for the code pasting. here i have attached my project file have look. Steps as below :- Test Suite Name = LibraryFile Test Case Name = LibTestCase Groovy Script Library 1st File Name = LibraryScripts GroovyScript Name Which calls methods.functions from Library 1st GScript = Groovy Script Groovy Script Library 2nd File Name = LibraryScripts_2 GroovyScript Name Which calls methods.functions from Library 1st GScript = Groovy Script_2 Here in the 1st library file and i have added simple code just returns the value. in second lib file there my actual need. there i am getting as above. Please have look at the project and do the needful... Thanks in Advance... Regards, Sandeep S SRe: How to write a reusable script LibraryHi Martin, Thanks a lot for sharing this code. Here i am facing some error can you any one help me out plz.. Here my flow goes i have created as per above code a Suite and Class in that as below.... called Library File class Example { def execute(message) { context.utils = new com.eviware.soapui.support.GroovyUtils(context) def response = context.expand( '${GetGeoIP#Response}' ) context.holder = context.utils.getXmlHolder(response) context.values = context.holder.getNodeValues("//ReturnCode") return context.values } } context.setProperty( "example", new Example() ) and below is my Calling Script which calls above method execute. as below library = testRunner.testCase.testSuite.project.testSuites["Library"] module = library.testCases["LibTestCase"].testSteps["Groovy Script"] module.run(testRunner, context) def example = context.example log.info example.execute("hi") and when try to exucute i got the below error plz let me know the solution for this and how can i resolve it.. Error as below Tue Feb 05 11:42:23 IST 2013:ERROR:groovy.lang.MissingPropertyException: No such property: context for class: Example groovy.lang.MissingPropertyException: No such property: context for class: Example at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.getProperty(GetEffectivePogoPropertySite.java:86) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at Example.execute(Script8.groovy:21) at Example$execute.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script10.run(Script10.groovy:17) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Re: Inserting data to excel with Groovy scriptHi I have used your code only and done some R&D finally i got your expected result here belowo is code. import jxl.*; import jxl.write.* Workbook workbook = Workbook.getWorkbook(new File("d:\\NewExcel.xls")); WritableWorkbook copy = Workbook.createWorkbook(new File("d:\\NewExcel.xls"),workbook); Sheet sheet1 = copy.getSheet("Sheet4"); WritableSheet sheet2 = copy.getSheet("Sheet1"); CL = 0; rows = sheet1.getRows(); for( tc_row in 1..rows-1){ WritableCell tmpA = sheet1.getCell(CL,tc_row); String s1 = tmpA.getContents(); log.info("$s1") Label label = new Label(CL,tc_row,s1); sheet2.addCell(label); } copy.write(); copy.close(); workbook.close(); I have also one query plz help me out in that... Regards, Sandeep S S