soapui

webservices SSL (https)

拜拜、爱过 提交于 2019-12-13 05:37:30
问题 If i have a webservice over https (https://mywebservice/myservice) that means that i need to have a certificate to connect to this webservice, right? Something like this: Java HTTPS client certificate authentication I don´t understand this point, assuming that my first question is correct, why can i connect to a webservice using soapUI 3.5 (and i don't have configuration "SSL Setting") but i always have a error if i communicate using Java (Axis 2 1.6.1) (i already try basic auth, with a lot

How to read values from XML Request and write into XML Response using Groovy?

巧了我就是萌 提交于 2019-12-13 05:19:58
问题 I am working on a groovy script in which I have to take values from request XML file and write those into XML response file. I know how to read values from normal XML as given below: def text = ''' <list> <technology> <name>Groovy</name> </technology> </list> ''' def list = new XmlParser().parseText(text) println list.technology.name.text() I can easily access nodes using above syntax. But in my case the request file have 'keyword:label' syntax. Consider below mentioned request file for

Saving project properties in SoapUI's groovy

一笑奈何 提交于 2019-12-13 05:16:18
问题 Here is my problem. I'm running TestRunner from command line in order not to launch SoapUI client. (anyway, same problem occurs when running TR straight from client, so not sure if worth mentioning but anyways...). I do it this way: testrunner <path_to_project> -r -a -f <path_to_reports> & pause In one of my TC I retrieve data from DB, then save it to project properties this way: testRunner.testCase.testSuite.project.setPropertyValue("key", value); Then I use it in next steps which works fine

Export result in text file by SoapUI

你离开我真会死。 提交于 2019-12-13 04:45:10
问题 I am using dotmailer.com ESP and using SoapUI for calling API. I can get summary of the campaign in JSON format but also I want to extract summary of that campaign into a text file but couldn't find any way. Anyone can help? Thanks. 回答1: You can do it using groovy. Simple add a groovy script testStep inside your testCase, there you can get the response from a previous testStep and save in a file. Since there are not many details in your question a generic way to do so could be: // get the

How to generate repeating xml elements in Savon?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 04:30:44
问题 soapUI generates this comment Zero or more repetitions in many places in the request XML that it builds. This is part of the XML request. <v1:Attachments> <!--Zero or more repetitions:--> <v1:Attachment> <v1:FileName>?</v1:FileName> <v1:FileExtension>?</v1:FileExtension> <v1:FileContents>cid:1220950351678</v1:FileContents> </v1:Attachment> </v1:Attachments> I am using Savon 2.2.0 for communicating with the external service. Ruby hashes need unique keys. I tried passing an array of hashes in

Can I pause for console input in a SOAPUI groovy script?

强颜欢笑 提交于 2019-12-13 04:12:23
问题 I've got a groovy script in SoapUI that pokes at a web service - I want things to warm up for a few minutes before I attach a profiler, so I'd the script to run for the warmup period, then wait for me to press return after I've attached the profiler. Is there a way to ask for user input in the groovy script? I tried something like this, but it always gets an IOException: log.info "Press return when ready..." System.in.withReader { answer = it.readLine() // java.io.IOException: Stream closed }

How to edit the existing excel sheet using groovy, without creating a copy of the same excel

Deadly 提交于 2019-12-13 03:48:02
问题 Want To edit the existing excel sheet using groovy, without creating a copy of the same excel Want to Update the Results in the same excel from which the data is fetched only the output should be written in different cells. I m new to Soap UI. kindly find the below code import java.io.* import jxl.* import jxl.write.* // Read data from excel def f=new File("D:\\Soap.xls"); def wk= Workbook.getWorkbook(f) def ws=wk.getSheet("Sheet1") def count = ws.getRows() for (int i=1;i<count;i++) { Cell c1

Integrating with TERYT - Polish Government web service

别说谁变了你拦得住时间么 提交于 2019-12-13 03:34:45
问题 I am trying to connect (without success) to the following WS using Java: Service address - https://uslugaterytws1test.stat.gov.pl/terytws1.svc WSDL address - https://uslugaterytws1test.stat.gov.pl/wsdl/terytws1.wsdl User - TestPubliczny Password - 1234abcd I tried to use soapui without success. Tried Basic and NTLM authentication, and I always get the following error: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a

Property transfer in SOAPUI using groovy script

旧街凉风 提交于 2019-12-13 02:35:17
问题 Hi i am new to soapui and have this situation.I have two service memberservice1 where the response has "Region" property.I need to check this property and see if its value is "SCR" i need to modify it to "SCA" and pass it to another WS memberservice2. I tried this way but couldnt get it.Can anyone please suggest. def smlholder = groovyUtils.getXMLholder("Webservice#request"); def node = smlholder.getnodevalue("//region"); if(node == 'SCA') testRunner.testcase.testSteps("anotherwebservicename"

How to pass context from Script to another Class groovy

若如初见. 提交于 2019-12-13 01:44:07
问题 Below is my Groovy Script which instantiates my classes. It is a part of a much larger Groovy Script, consisting of many classes, which sits as a Test Case within a Test Suite in SoapUI : public class Run extends Script { public static void main (String[] args){ Run mainRun = new Run() } public run(){ def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ); // Would not error Model myModel = new Model() View myView = new View() Controller myController = new Controller()