JMcKinley
17 years agoContributor
Problem instantiating a groovy class from another groovy class
When I bring up SOAP UI Pro, it gives me an error that it could not resolve a class... I call this class from another class...
Here is the class declaration:
package soapui.Test
class Testdebug
I didn't have any constructors as they weren't needed but I also tried adding a blank constructor.
In my second class, the line to instantiate the class is:
def currentClassDebug = new soapui.Test.Testdebug()
For what we are doing, I did move the script folder to a different path and changed the path to reflect where the classes are... and this works when instantiating a class from a script inside a test case.
The weird thing is that when I edit the classes while SOAP UI Pro is up, it recompiles the classes fine... it only gives me the error when opening up SOAP... plus the script in the test case won't work unless I comment the class in my second class (well, it does work if i compile the script while SOAP is up
).
Any ideas? Is this a bug in SOAP in the system trying to find the class OR is there something I need to do to make it work?
One other thing:
The above instantiation works just fine from a script in the test case... it only doesn't work when used in another class.
Help!!
Here is the class declaration:
package soapui.Test
class Testdebug
I didn't have any constructors as they weren't needed but I also tried adding a blank constructor.
In my second class, the line to instantiate the class is:
def currentClassDebug = new soapui.Test.Testdebug()
For what we are doing, I did move the script folder to a different path and changed the path to reflect where the classes are... and this works when instantiating a class from a script inside a test case.
The weird thing is that when I edit the classes while SOAP UI Pro is up, it recompiles the classes fine... it only gives me the error when opening up SOAP... plus the script in the test case won't work unless I comment the class in my second class (well, it does work if i compile the script while SOAP is up

Any ideas? Is this a bug in SOAP in the system trying to find the class OR is there something I need to do to make it work?
One other thing:
The above instantiation works just fine from a script in the test case... it only doesn't work when used in another class.
Help!!