sumitbaliyan
11 years agoOccasional Contributor
Where to place my .jar in SoapUI directory
Hi,
Looking forward to access java code using SoapUI (free version), but failing to do so. Listing below the 'java code + Groovy Script' and steps i followed, it would be great if I can be guided on this
1. Create code in java using eclipse
package com.sumit;
public class access {
public String access1(){
return "Sumit Baliyan";
}
}
2. Created jar of it
3. Copied jar file in 'lib' folder of SoapUI
4. Now Launched SoapUI
5. Write below code in Groovy Test Step
import com.sumit.*
access ac = new access()
def b = ac.access1()
log.info b
6. Run code and I get this error
groovy.lang.MissingMethodException: No signature of method: Script8.access() is applicable for argument types: (com.sumit.access) values: [com.sumit.access@cc0596]
Note: When i access same jar file in another java program using eclipse it works fine, below is the java code to use jar file code
import com.sumit.access;
public class HelloWorld {
public static void main(String[] args) {
access ac = new access();
String b = ac.access1();
System.out.println(b);
}
}
Looking forward to access java code using SoapUI (free version), but failing to do so. Listing below the 'java code + Groovy Script' and steps i followed, it would be great if I can be guided on this
1. Create code in java using eclipse
package com.sumit;
public class access {
public String access1(){
return "Sumit Baliyan";
}
}
2. Created jar of it
3. Copied jar file in 'lib' folder of SoapUI
4. Now Launched SoapUI
5. Write below code in Groovy Test Step
import com.sumit.*
access ac = new access()
def b = ac.access1()
log.info b
6. Run code and I get this error
groovy.lang.MissingMethodException: No signature of method: Script8.access() is applicable for argument types: (com.sumit.access) values: [com.sumit.access@cc0596]
Note: When i access same jar file in another java program using eclipse it works fine, below is the java code to use jar file code
import com.sumit.access;
public class HelloWorld {
public static void main(String[] args) {
access ac = new access();
String b = ac.access1();
System.out.println(b);
}
}