cancel
Showing results for 
Search instead for 
Did you mean: 

Extension classpath of soapui java integration

SOLVED
Highlighted
New Contributor

Extension classpath of soapui java integration

I have seen solutions to extending the soapui classpath to custom locations using ClasspathHacker in the soapui library.

 

However this have always been implemented in the scripts where the imports are made. I wonder if this could be done in java code directly. For example I am constructing a MockRunner in java using the soapui library. In turn this MockRunner takes in a soapui project and extracts the mockservice and runs it. The mockservice operation contains a groovyscript which requires some external library imports. 

 

Now instead of defining the ClasspathHacker in the groovyscript, can I somehow do this inside the java code, attached to the operation, mockservice or project? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Contributor

Ended up initiating my own DefaultSoapUICore with my desired root and loading it to SoapUI as follows

 

DefaultSoapUICore core = new DefaultSoapUICore("rootpath");
core.createDefault();
SoapUI.setSoapUICore(core);

 Note that I am not yet sold on my solution since playing around with the core might have unexpected effects that I am not yet aware of, but it works fine for me so far in my current implementation.

View solution in original post

1 REPLY 1
Highlighted
New Contributor

Ended up initiating my own DefaultSoapUICore with my desired root and loading it to SoapUI as follows

 

DefaultSoapUICore core = new DefaultSoapUICore("rootpath");
core.createDefault();
SoapUI.setSoapUICore(core);

 Note that I am not yet sold on my solution since playing around with the core might have unexpected effects that I am not yet aware of, but it works fine for me so far in my current implementation.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors