ContributionsMost RecentMost LikesSolutionsRe: read&Print soap response with Groovy script Hi Rao, Sorry for delay for your response. finally i am able to read and validate response. I had good progress after couple your response. Re: Dynamic request creation with Groovy - element Create Sorry Rao, the solution which you provided is worked me. thanks for you help. Re: How to write a reusable script Library Hi Martin, its really helpful , But how can we create groovy jar file and get in into soapui project. Thanks babu Re: How to import external java classes in SoapUI 5.0.0 ? Hi Vikram, I am also trying to crate all my common functions in Groovy jar file and need to import to SoapUI 5.0 free version. Could you please help me how can i achieve this one. Thanks Babu read&Print soap response with Groovy script Hi, I am trying to the automate the my requirement as read soap response and write it. In groovy script , i am getting the response and need to read the ResponseHeader and list of the people form getlist Below is the Sample Soap Response <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <soapenv:Body> <ns0:GetListBy_QualificationResponse xmlns:ns0="urn:WS_CTM_People_ICEVA"> <ResponseHeader> <Status></Status> <ErrorCode></ErrorCode> <ErrorMessage></ErrorMessage> </ResponseHeader> <getList> <get1> <Person_ID>PPL000000301739</Person_ID> <Submitter>soehler</Submitter> </get1> <get2> <Person_ID>PPL000000301739</Person_ID> <Submitter>soehler</Submitter> </get2> <get3> <Person_ID>PPL000000301739</Person_ID> <Submitter>soehler</Submitter> </get3> <get4> <Person_ID>PPL000000301739</Person_ID> <Submitter>soehler</Submitter> </get4> </getListValues> <personStatus></personStatus> </ns0:GetListBy_QualificationResponse> </soapenv:Body> </soapenv:Envelope> SolvedRe: write Excel Data with poi api in Groovy script - SOAPUI 5.0.0 Hi You can try in keeping in \Exe folder.. Re: Dynamic request creation with Groovy - element Create Hi nmRao Good Morning, thanks for your link, But i am looking part the Request need to repeat as per input, I followed your one of the link http://groovyconsole.appspot.com/script/5169502497013760. But no luck. While create SOAP Request i need to call another method to repeat. Thanks Re: Dynamic request creation with Groovy - element Create In the below Groovy Script, I need to loop RequestElement element as per input, I am passing Account details to method and should create out with number Account for RequestElement. import groovy.xml.StreamingMarkupBuilder import groovy.xml.XmlUtil def createRequest(def accountNumbers){ //Define all your namespaces here def nameSpacesMap = [ soapenv: 'http://schemas.xmlsoap.org/soap/envelope/', ns: 'ABC', ] def builder = new StreamingMarkupBuilder() builder.encoding ='utf-8' def soapRequest = builder.bind { namespaces << nameSpacesMap soapenv.Envelope { soapenv.Header{} soapenv.Body { //example for element attribute ns.TOPPER{ RequestHeader{ MessageId("ABC"); } RequestElement{ accountnumber("84144135"); } RequestElement{ accountnumber("84023193"); } } } } } return XmlUtil.serialize(soapRequest); } def accountdetails = "84144135,84023193"; log.info createRequest(accountdetails); <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="ABC"> <soapenv:Header/> <soapenv:Body> <ns:TOPPER> <RequestHeader> <MessageId>ABC</MessageId> </RequestHeader> <RequestElement> <accountnumber>84144135</accountnumber> </RequestElement> <RequestElement> <accountnumber>84023193</accountnumber> </RequestElement> </ns:TOPPER> </soapenv:Body> </soapenv:Envelope> Dynamic request creation with Groovy - element Create As per my project, i have to create part of SOAP request as per input data, I have developed below code and not able to get, could some one help me. import groovy.xml.StreamingMarkupBuilder import groovy.xml.XmlUtil class DR{ //This Method is used to Create DRequestElement element as per request def DRE(def accountdetails){ // change the account string to list def acclist = accountdetails.tokenize(','); def builder_acc = new StringBuilder() for (item in acclist){ builder_acc.append("RequestElement{"); builder_acc.append( "accountnumber(") builder_acc.append(item); builder_acc.append( ")"); builder_acc.append( "}"); } return builder_acc; } } def createRequest(def accountNumbers){ //Define all your namespaces here def nameSpacesMap = [ soapenv: 'http://schemas.xmlsoap.org/soap/envelope/', ns: 'ABC', ] def builder = new StreamingMarkupBuilder() builder.encoding ='utf-8' def soapRequest = builder.bind { namespaces << nameSpacesMap soapenv.Envelope { soapenv.Header{} soapenv.Body { //example for element attribute ns.TOPPER{ RequestHeader{ MessageId("ABC"); } new DR().DRE(accountNumbers); } } } } return XmlUtil.serialize(soapRequest); } def accountdetails = "84144135,84023193"; log.info createRequest(accountdetails); <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="ABC"> <soapenv:Header/> <soapenv:Body> <ns:TOPPER> <RequestHeader> <MessageId>ABC</MessageId> </RequestHeader> <RequestElement> <accountnumber>84144135</accountnumber> </RequestElement> <RequestElement> <accountnumber>84023193</accountnumber> </RequestElement> </ns:TOPPER> </soapenv:Body> </soapenv:Envelope> SolvedRe: how to get node values using Xml Parser log.info BM.children().find( {it.name() == "A"})?.text();