问题
getting java.lang.ClassNotFoundException: com.eviware.soapui.config.InvalidSecurityScanConfig
at
WsdlProject project = new WsdlProject();
All necessary jars(soapui-4.0.1.0.jar,soapui-xmlbeans-1.7.jar,wsdl4j.jar) are imported though it is giving error at runtime. what can be the reason behind it?
public class SOAPInputGenerator {
public static void main(String[] args) throws Exception {
WsdlProject project = new WsdlProject();
WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, "http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?WSDL");
WsdlInterface wsdl = wsdls[0];
for (Operation operation : wsdl.getOperationList()) {
WsdlOperation wsdlOperation = (WsdlOperation) operation;
System.out.println("OP:"+wsdlOperation.getName());
System.out.println("Request:");
System.out.println(wsdlOperation.createRequest(true));
System.out.println("Response:");
System.out.println(wsdlOperation.createResponse(true));
}
}
回答1:
According this blog, the feature is available in SoapUI 4.x release.
It is clear that you did not have the jar file in the class path.
In SoapUI 4.0.1, the class file, com.eviware.soapui.config.InvalidSecurityScanConfig
is available in different jar file, called SOAPUI_HOME/lib/soapui-xmlbeans-4.0.1.jar
.
Here you can see:
Also not sure where did you get soapui-xmlbeans-1.7.jar
file, as I could not find it in the same version which you can see in the screen shot above.
Later version of soapui, say 4.5 onwards, the same class is part of the core jar file i.e., SOAPUI_HOME/bin/soapui-4.5.*.jar
By the way, not sure(any constraints?) for using very old version.
回答2:
use jar soapui-4.6.1.jar
instead of soapui-4.0.1.0.
you can download it from https://sourceforge.net/projects/soapui/
来源:https://stackoverflow.com/questions/35697510/java-lang-classnotfoundexception-com-eviware-soapui-config-invalidsecurityscanc