Forum Discussion
Also happened to find below thread where groovy can call "Javascript" in case javascript suits better.
http://stackoverflow.com/questions/2704415/call-javascript-function-from-java-groovy-class
Hi nmrao,
Yeah, sorry I meant Java AWS SDK - this one:
https://aws.amazon.com/sdk-for-java/
At the time I didn't find it easy to integrate, due to it requiring newer versions of some of the same dependencies that soapui uses in its lib folder - adding the newer versions in the /ext folder lead to classpath issues. However, I expect its possible to succeed if you alter / override some of the SoapUI libs, and Paul may well manage it, its just that I didn't have a lot of time and couldn't really suggest recipes in that cookbook that went too far off the beaten track.
Thanks,
Rup
- rupert_anderson9 years agoValued Contributor
Possibly, a longer term solution would be to raise an improvement request to update some of the versions of the Apache commons libraries in the SoapUI lib folder (which would be good anyway, may take some refactoring) and I could pick up the ticket and hopefully fix it up in GitHub for the next version of SoapUI. Then the AWS Java SDK and possibly other extensions, might be easier to integrate directly.
Thanks,
Rup
- Paul4249 years agoOccasional Contributor
Actually i meant not the sdk for java but either:
- awscli (which is in boto3/python)
- aws-sdk for javascript (https://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-intro.html)
I'm not familiar with groovy and its capabilities to interop with python or js? But i guess it should be feasible to import the .js libraries from a javascript right? What kind of js support does soapui have?
Another option could be to run an external (wrapper) script/program?
Paul
- rupert_anderson9 years agoValued Contributor
Sure, I don't know about those other SDKs. Possibly the JavaScript one could be made to work, an interesting challenge, but not something I can guide you on beyond the basics. Like I say I have only played with JavaScript within SoapUI, I wouldn't be surprised if there were limits.
I mainly chose the Groovy approach & Java AWS SDK, because Groovy is a first class citizen within SoapUI, whereas JavaScript might not be. Also the Java syntax is obviously legal Groovy e.g. the AWS Java SDK samples should work with a minimum of effort within SoapUI Groovy TestSteps. I like Python, but I am personally not aware of any synergies with Groovy or SoapUI. The libs that that Java AWS SDK packages are quite a lot:
aspectjrt-1.8.2.jar aspectjweaver.jar commons-codec-1.9.jar commons-logging-1.1.3.jar freemarker-2.3.9.jar httpclient-4.5.2.jar httpcore-4.4.4.jar ion-java-1.0.0.jar jackson-annotations-2.6.0.jar jackson-core-2.6.6.jar jackson-databind-2.6.6.jar jackson-dataformat-cbor-2.6.6.jar javax.mail-api-1.4.6.jar jmespath-java-1.0.jar joda-time-2.8.1.jar spring-beans-3.0.7.RELEASE.jar spring-context-3.0.7.RELEASE.jar spring-core-3.0.7.RELEASE.jar spring-test-3.0.7.RELEASE.jar
The idea of an external wrapper, was also something I was thinking about. It could be the cleanest architectural and most flexible approach at this point.
Interesting stuff you're doing :-)
Regards,
Rup