ContributionsMost RecentMost LikesSolutionsrelativePath (soapui java API) Hi all, i'mtrying to find the way how to set relativePath for project xml's and also for datasource. Cause' I'm trying to automate all soap and rest tests in our company. And all collegues create their own soapui tests/projects and plan is run this projects or just suites, testCases from Bamboo. what I trying is: private static final String OUTPUT_FOLDER_PATH = WorkspaceImpl.class.getResource("src/test/resources/suites/").getPath(); and than from bamboo iwill send specific name of the XML what I want to start. but problem is that i'm not sure if this way is correct, cause' doesnt work. Could somebody write me how to do it? Some example will help :-) Thanks soapUI java api hi there, i started to develop test-runner in java, and I have few questions, 1. where is difference between soapUI Pro java API and free SoapUI java API, i check javadocs but almost everything is same 2. Could you give me some example for datasorce code? I tried to use some methods but still failing. I've create workaround but I want to use just soapUI api 3. time to time if I looking something, some links are old. Could you give me links for javadocs? The new ones Thanks Stanislav Re: groovy blob read So I've found the solution... import groovy.sql.Sql import java.sql.* sql = Sql.newInstance("jdbc:oracle:thin:@::", "", "") //selct blob java.sql.Blob blob = sql.firstRow("SELECT CASE.APPLICATIONS.DATAPACKAGE as blob FROM CASE.APPLICATIONS WHERE APPLICATIONS.STATUS = '0' And APPLICATIONS.APPLICATIONNAME Is Not Null ORDER BY APPLICATIONS.CREATED DESC").blob byte[] bdata = blob.getBytes(1, (int) blob.length()); String text = new String(bdata); log.info text; next step is decrypt blob... groovy blob read Hi, I;m trying to read blob from DB, I've created this script (below) def blob = sql.firstRow("SELECT CASE.APPLICATIONS.DATAPACKAGE as blob FROM CASE.APPLICATIONS WHERE APPLICATIONS.STATUS = '0' And APPLICATIONS.APPLICATIONNAME Is Not Null ORDER BY APPLICATIONS.CREATED DESC").blob String datapackage = new String(blob.getBytes(1,(int)blob.length())) log.info datapackage byte[] readBits = datapackage.getBytes(1L, datapackage.length()as int) log.info 'bits: ' + new String(readBits) sql.close() but I'm still getting this error, line 8 is: byte[] readBits groovy.lang.MissingMethodException: No signature of method: java.lang.String.getBytes() is applicable for argument types: (java.lang.Long, java.lang.Integer) values: [1, 184] Possible solutions: getBytes(), getBytes(java.lang.String), getBytes(java.nio.charset.Charset), getBytes(int, int, [B, int), getClass(), getChars() error at line: 8 Thanks for help SolvedRe: Call Java class with variable in groovy It works! thanks a lot... :-) Regards Stan Re: Call Java class with variable in groovy Thanks a lot... I'll try. Regards Stan Re: Call Java class with variable in groovy Maybe, fastest will be, rewrite this class to the groovy... could someone help? thanks Re: Call Java class with variable in groovy Yes I have source code whole java class. public final class TicketTestUtil { private static final Gson gson = JsonUtils.createGson(false); private static final String HMAC_PASSWORD_IN_BASE64 = "xxxxxxxxx"; private TicketTestUtil() { // empty on purpose for utility class } public static String generateTicketJson() { Ticket ticket = generateTicket(); return gson.toJson(ticket); } public static Ticket generateTicket() { RandomStringGenerator randomStringGenerator = new SecuredRandomStringGenerator(SecuredRandomStringGenerator.Alphabet.ALPHANUMERIC_CHARS); Ticket ticket = new Ticket(); ticket.setChannel(1l); ticket.setAlgorithmType(1l); ticket.setMethodType(1l); ticket.setTicketNonce(randomStringGenerator.nextString(20).toString()); ticket.setOliNumber("4778077007"); ticket.setTicketTimeStamp(new LocalDateTime(DateTimeZone.UTC).toDateTime(DateTimeZone.UTC).getMillis()); ticket.setTicketVersion(1l); ticket.setClientThreadId(1l); ByteSource hmacPassword; try { hmacPassword = ByteSourceFactory.create(new Base64Codec().decode(HMAC_PASSWORD_IN_BASE64.getBytes(StandardCharsets.UTF_8))); } catch (CodecException e) { return null; } HMACHashFunction hmacHash = new HMACHashFunction(HMAC_SHA256, hmacPassword); String hmac = ""; try { hmac = hmacHash.computeHash(ByteSourceFactory.create(ticket.getOliNumber() + ticket.getChannel() + ticket.getTicketNonce() + ticket.getTicketTimeStamp() + String.valueOf(ticket.getMethodType()))).toBase64(); } catch (HashException e) { // error not logged, we don"t care } ticket.setHmac(hmac); return ticket; } } In the static generateTicket() is setOliNumber and there I need to set variable waht will I send from groovy in soapUI. Call Java class with variable in groovy Hi all... I need to call java class and send variable in to. I know how to call class. my code: def oliNum="1234567890" Ticket newTicket = TicketTestUtil.generateTicket(); log.info newTicket; And I need send -> oliNum in to the java class. Could you help please? Thanks Solved